mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-29 00:11:58 +02:00
Complete OptionTest coverage
This commit is contained in:
parent
eb589b2b94
commit
a2dd095c81
@ -32,14 +32,16 @@ class OptionTest extends TestCase
|
|||||||
$response = $this->actingAs($this->user, 'api')
|
$response = $this->actingAs($this->user, 'api')
|
||||||
->json('POST', '/api/settings/options', [
|
->json('POST', '/api/settings/options', [
|
||||||
'setting_1' => 'value_1',
|
'setting_1' => 'value_1',
|
||||||
'setting_2' => 'value_2',
|
'setting_2' => true,
|
||||||
|
'setting_3' => false,
|
||||||
])
|
])
|
||||||
->assertStatus(200)
|
->assertStatus(200)
|
||||||
->assertJson([
|
->assertJson([
|
||||||
'message' => __('settings.forms.setting_saved'),
|
'message' => __('settings.forms.setting_saved'),
|
||||||
'settings' => [
|
'settings' => [
|
||||||
'setting_1' => 'value_1',
|
'setting_1' => 'value_1',
|
||||||
'setting_2' => 'value_2',
|
'setting_2' => true,
|
||||||
|
'setting_3' => false,
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@ -53,7 +55,8 @@ class OptionTest extends TestCase
|
|||||||
public function testSettingsIndexListing()
|
public function testSettingsIndexListing()
|
||||||
{
|
{
|
||||||
option(['setting_1' => 'value_1']);
|
option(['setting_1' => 'value_1']);
|
||||||
option(['setting_2' => 'value_2']);
|
option(['setting_2' => true]);
|
||||||
|
option(['setting_3' => false]);
|
||||||
|
|
||||||
$response = $this->actingAs($this->user, 'api')
|
$response = $this->actingAs($this->user, 'api')
|
||||||
->json('GET', '/api/settings/options')
|
->json('GET', '/api/settings/options')
|
||||||
@ -61,7 +64,8 @@ class OptionTest extends TestCase
|
|||||||
->assertJson([
|
->assertJson([
|
||||||
'settings' => [
|
'settings' => [
|
||||||
'setting_1' => 'value_1',
|
'setting_1' => 'value_1',
|
||||||
'setting_2' => 'value_2'
|
'setting_2' => true,
|
||||||
|
'setting_3' => false,
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user