diff --git a/app/Http/Controllers/Api/GeneralController.php b/app/Http/Controllers/Api/GeneralController.php index 9fb36d964aad..23ba1fa4485f 100644 --- a/app/Http/Controllers/Api/GeneralController.php +++ b/app/Http/Controllers/Api/GeneralController.php @@ -17,7 +17,7 @@ /** * This is the general api controller. * - * @author James Brooks + * @author James Brooks */ class GeneralController extends AbstractApiController { diff --git a/tests/SmokeTest.php b/tests/SmokeTest.php new file mode 100644 index 000000000000..d3f91bdd3004 --- /dev/null +++ b/tests/SmokeTest.php @@ -0,0 +1,67 @@ + + */ +class SmokeTest extends AbstractTestCase +{ + use DatabaseMigrations; + + public function test_setup_page() + { + $this->get('/setup')->assertStatus(200); + } + + public function test_status_page() + { + $this->configureApp(); + + $this->get('/')->assertStatus(200); + } + + public function test_single_component_page() + { + $this->configureApp(); + + $this->get('/incidents/1')->assertStatus(200); + } + + public function test_dashboard_auth_page() + { + $this->configureApp(); + + $this->get('/auth/login')->assertStatus(200); + } + + protected function configureApp() + { + factory(Setting::class)->create([ + 'name' => 'app_name', + 'value' => 'Cachet Test Suite', + ]); + + $component = factory(Component::class)->create(); + + $incident = factory(Incident::class)->create([ + 'component_id' => $component->id, + ]); + } +}