From 0f40bbd2754666e9abaf3c52afcab1daad20bea1 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Fri, 11 May 2018 19:02:13 +0100 Subject: [PATCH 1/3] Fix my email --- app/Http/Controllers/Api/GeneralController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { From 57de608d0b4f80c33c141fd434b87847d8592a78 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Sun, 17 Jun 2018 09:59:28 +0100 Subject: [PATCH 2/3] Start work on smoke tests --- tests/SmokeTest.php | 58 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 tests/SmokeTest.php diff --git a/tests/SmokeTest.php b/tests/SmokeTest.php new file mode 100644 index 000000000000..b1fa4900d68b --- /dev/null +++ b/tests/SmokeTest.php @@ -0,0 +1,58 @@ + + */ +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, + ]); + } +} From 5b4b2fe29e60473be37f67115fd32874e0393685 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Sun, 17 Jun 2018 09:00:12 +0000 Subject: [PATCH 3/3] Apply fixes from StyleCI [ci skip] [skip ci] --- tests/SmokeTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/SmokeTest.php b/tests/SmokeTest.php index b1fa4900d68b..d3f91bdd3004 100644 --- a/tests/SmokeTest.php +++ b/tests/SmokeTest.php @@ -1,5 +1,14 @@