remove hack for test
This commit is contained in:
parent
b6cda88ae4
commit
b520a464cb
@ -69,11 +69,6 @@ class UserController extends Controller
|
||||
*/
|
||||
public function sign()
|
||||
{
|
||||
// Hacking for testing
|
||||
if (config('app.env') == 'testing') {
|
||||
$this->user = User::find($this->user->uid);
|
||||
}
|
||||
|
||||
if ($this->user->canSign()) {
|
||||
$acquiredScore = $this->user->sign();
|
||||
|
||||
|
@ -88,9 +88,10 @@ class UserControllerTest extends TestCase
|
||||
)
|
||||
]);
|
||||
|
||||
$user->last_sign_at = \Carbon\Carbon::today()->toDateTimeString();
|
||||
$user->save();
|
||||
$this->postJson('/user/sign')
|
||||
$user = factory(User::class)->create([
|
||||
'last_sign_at' => \Carbon\Carbon::today()->toDateTimeString()
|
||||
]);
|
||||
$this->actAs($user)->postJson('/user/sign')
|
||||
->assertJson([
|
||||
'errno' => 0
|
||||
]);
|
||||
|
Loading…
Reference in New Issue
Block a user