mirror of
https://github.com/Kovah/LinkAce.git
synced 2025-03-14 19:59:38 +01:00
Correct testing for guest tags
This commit is contained in:
parent
11de29e8e8
commit
e12adce71f
@ -26,14 +26,21 @@ class TagControllerTest extends TestCase
|
||||
{
|
||||
User::factory()->create();
|
||||
|
||||
$tagPublic = Tag::factory()->create(['is_private' => false]);
|
||||
$tagPrivate = Tag::factory()->create(['is_private' => true]);
|
||||
Tag::factory()->create([
|
||||
'name' => 'public tag',
|
||||
'is_private' => false
|
||||
]);
|
||||
|
||||
Tag::factory()->create([
|
||||
'name' => 'private tag',
|
||||
'is_private' => true
|
||||
]);
|
||||
|
||||
$response = $this->get('guest/tags');
|
||||
|
||||
$response->assertOk()
|
||||
->assertSee($tagPublic->name)
|
||||
->assertDontSee($tagPrivate->name);
|
||||
->assertSee('public tag')
|
||||
->assertDontSee('private tag');
|
||||
}
|
||||
|
||||
public function testValidTagDetailResponse(): void
|
||||
|
Loading…
x
Reference in New Issue
Block a user