31 lines
		
	
	
		
			831 B
		
	
	
	
		
			PHP
		
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			831 B
		
	
	
	
		
			PHP
		
	
	
	
<?php
 | 
						|
 | 
						|
namespace Tests\Settings;
 | 
						|
 | 
						|
use Tests\TestCase;
 | 
						|
 | 
						|
class SettingsTest extends TestCase
 | 
						|
{
 | 
						|
    public function test_settings_endpoint_redirects_to_settings_view()
 | 
						|
    {
 | 
						|
        $resp = $this->asAdmin()->get('/settings');
 | 
						|
 | 
						|
        $resp->assertRedirect('/settings/features');
 | 
						|
    }
 | 
						|
 | 
						|
    public function test_settings_category_links_work_as_expected()
 | 
						|
    {
 | 
						|
        $this->asAdmin();
 | 
						|
        $categories = [
 | 
						|
            'features' => 'Features & Security',
 | 
						|
            'customization' => 'Customization',
 | 
						|
            'registration' => 'Registration',
 | 
						|
        ];
 | 
						|
 | 
						|
        foreach ($categories as $category => $title) {
 | 
						|
            $resp = $this->get("/settings/{$category}");
 | 
						|
            $resp->assertElementContains('h1', $title);
 | 
						|
            $resp->assertElementExists("form[action$=\"/settings/{$category}\"]");
 | 
						|
        }
 | 
						|
    }
 | 
						|
} |