From 74f56916ad8e987b0d9517bffd549ac892cd3812 Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Sun, 19 May 2019 14:49:49 +0800 Subject: [PATCH] Fix test --- tests/ReportControllerTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/ReportControllerTest.php b/tests/ReportControllerTest.php index 04fc4d19..34a5704a 100644 --- a/tests/ReportControllerTest.php +++ b/tests/ReportControllerTest.php @@ -219,7 +219,8 @@ class ReportControllerTest extends TestCase $report->status = Report::PENDING; $report->save(); $score = $reporter->score; - $this->postJson('/admin/reports', ['id' => $report->id, 'action' => 'ban']) + $this->actingAs($admin) + ->postJson('/admin/reports', ['id' => $report->id, 'action' => 'ban']) ->assertJson([ 'code' => 0, 'message' => trans('general.op-success'),