3 namespace Tests\Settings;
7 class SettingsTest extends TestCase
9 public function test_settings_endpoint_redirects_to_settings_view()
11 $resp = $this->asAdmin()->get('/settings');
13 $resp->assertStatus(302);
15 // Manually check path to ensure it's generated as the full path
16 $location = $resp->headers->get('location');
17 $this->assertEquals(url('/settings/features'), $location);
20 public function test_settings_category_links_work_as_expected()
24 'features' => 'Features & Security',
25 'customization' => 'Customization',
26 'registration' => 'Registration',
29 foreach ($categories as $category => $title) {
30 $resp = $this->get("/settings/{$category}");
31 $resp->assertElementContains('h1', $title);
32 $resp->assertElementExists("form[action$=\"/settings/{$category}\"]");
36 public function test_not_found_setting_category_throws_404()
38 $resp = $this->asAdmin()->get('/settings/biscuits');
40 $resp->assertStatus(404);
41 $resp->assertSee('Page Not Found');