Skip to content

Commit

Permalink
update ModeratorTest
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiorodriguesroque committed Dec 31, 2023
1 parent a6869b8 commit f379758
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/Feature/ModeratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

use App\Models\Thread;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Tests\Feature\BrowserKitTestCase;
use Tests\TestCase;

uses(BrowserKitTestCase::class);
uses(TestCase::class);
uses(DatabaseMigrations::class);

test('moderators can edit any thread', function () {
$thread = Thread::factory()->create();

$this->loginAsModerator();

$this->visit('/forum/'.$thread->slug().'/edit')
->assertResponseOk();
$this->get('/forum/'.$thread->slug().'/edit')
->assertSuccessful();
});

test('moderators can delete any thread', function () {
Expand All @@ -22,5 +22,5 @@
$this->loginAsModerator();

$this->delete('/forum/'.$thread->slug())
->assertRedirectedTo('/forum');
->assertRedirect('/forum');
});

0 comments on commit f379758

Please sign in to comment.