1
0
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:
Kovah 2020-12-17 23:17:52 +01:00
parent 11de29e8e8
commit e12adce71f
No known key found for this signature in database
GPG Key ID: AAAA031BA9830D7B

View File

@ -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