fix test
This commit is contained in:
parent
1fe1aab59c
commit
9e05b7c843
@ -83,19 +83,19 @@ class UserControllerTest extends TestCase
|
||||
]);
|
||||
|
||||
// Remaining time is greater than 0
|
||||
$user->last_sign_at = get_datetime_string();
|
||||
$user->save();
|
||||
$this->postJson('/user/sign')
|
||||
->assertJson([
|
||||
'errno' => 1,
|
||||
/* 'msg' => trans(
|
||||
'msg' => trans(
|
||||
'user.cant-sign-until',
|
||||
[
|
||||
'time' => option('sign_gap_time'),
|
||||
'unit' => trans('user.time-unit-hour')
|
||||
]
|
||||
) */
|
||||
)
|
||||
]);
|
||||
$user = User::find($user->uid);
|
||||
$this->assertEquals(option('sign_gap_time'), round($user->getSignRemainingTime() / 3600));
|
||||
|
||||
// Can sign after 0 o'clock
|
||||
option(['sign_after_zero' => true]);
|
||||
|
Loading…
Reference in New Issue
Block a user