From a2dd095c817b5301764f4fe4d421960f88133519 Mon Sep 17 00:00:00 2001 From: Bubka <858858+Bubka@users.noreply.github.com> Date: Mon, 23 Mar 2020 21:58:15 +0100 Subject: [PATCH] Complete OptionTest coverage --- tests/Unit/Settings/OptionTest.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/Unit/Settings/OptionTest.php b/tests/Unit/Settings/OptionTest.php index 5fbaba0b..3b8ca4d6 100644 --- a/tests/Unit/Settings/OptionTest.php +++ b/tests/Unit/Settings/OptionTest.php @@ -32,14 +32,16 @@ public function testSettingsStorage() $response = $this->actingAs($this->user, 'api') ->json('POST', '/api/settings/options', [ 'setting_1' => 'value_1', - 'setting_2' => 'value_2', + 'setting_2' => true, + 'setting_3' => false, ]) ->assertStatus(200) ->assertJson([ 'message' => __('settings.forms.setting_saved'), 'settings' => [ 'setting_1' => 'value_1', - 'setting_2' => 'value_2', + 'setting_2' => true, + 'setting_3' => false, ] ]); } @@ -53,7 +55,8 @@ public function testSettingsStorage() public function testSettingsIndexListing() { option(['setting_1' => 'value_1']); - option(['setting_2' => 'value_2']); + option(['setting_2' => true]); + option(['setting_3' => false]); $response = $this->actingAs($this->user, 'api') ->json('GET', '/api/settings/options') @@ -61,7 +64,8 @@ public function testSettingsIndexListing() ->assertJson([ 'settings' => [ 'setting_1' => 'value_1', - 'setting_2' => 'value_2' + 'setting_2' => true, + 'setting_3' => false, ] ]); }