From 7242b18ff0e4d4abeefe8339864c0594ced7e102 Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov <sasha.skvortsov109@gmail.com> Date: Tue, 16 Nov 2021 16:54:23 -0500 Subject: [PATCH] Fix test cases for SetSettingsController --- tests/integration/api/settings/SetTest.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/integration/api/settings/SetTest.php b/tests/integration/api/settings/SetTest.php index d335950b4..03c6ca384 100644 --- a/tests/integration/api/settings/SetTest.php +++ b/tests/integration/api/settings/SetTest.php @@ -44,8 +44,8 @@ class SetTest extends TestCase ]) ); - // Test for successful response and that the email is included in the response - $this->assertEquals(200, $response->getStatusCode()); + $this->assertEquals(403, $response->getStatusCode()); + $this->assertNotEquals('world', $this->app->getContainer()->make('flarum.settings')->get('hello')); } /** @@ -62,8 +62,8 @@ class SetTest extends TestCase ]) ); - // Test for successful response and that the email is included in the response - $this->assertEquals(200, $response->getStatusCode()); + $this->assertEquals(204, $response->getStatusCode()); + $this->assertEquals('world', $this->app->getContainer()->make('flarum.settings')->get('hello')); } /** @@ -80,7 +80,6 @@ class SetTest extends TestCase ]) ); - // Test for successful response and that the email is included in the response $this->assertEquals(422, $response->getStatusCode()); } }