fix test finally (#4)

* comment out a test

* set an option
This commit is contained in:
Pig Fang 2019-02-17 21:23:07 +08:00 committed by GitHub
parent 0d4f34770e
commit 9386992fde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -85,6 +85,7 @@ class UserControllerTest extends TestCase
// Remaining time is greater than 0 // Remaining time is greater than 0
$user = factory(User::class)->create(['last_sign_at' => get_datetime_string()]); $user = factory(User::class)->create(['last_sign_at' => get_datetime_string()]);
option(['sign_gap_time' => 2]);
$this->actAs($user) $this->actAs($user)
->postJson('/user/sign') ->postJson('/user/sign')
->assertJson([ ->assertJson([
@ -92,7 +93,7 @@ class UserControllerTest extends TestCase
'msg' => trans( 'msg' => trans(
'user.cant-sign-until', 'user.cant-sign-until',
[ [
'time' => option('sign_gap_time'), 'time' => 2,
'unit' => trans('user.time-unit-hour') 'unit' => trans('user.time-unit-hour')
] ]
) )