This commit is contained in:
Pig Fang 2019-02-17 10:23:25 +08:00
parent 1fe1aab59c
commit 9e05b7c843

View File

@ -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]);