feat: ship creator journey v2 and profile updates
This commit is contained in:
@@ -23,6 +23,25 @@ test('authenticated user can post a comment', function () {
|
||||
->assertJsonStructure(['data' => ['id', 'raw_content', 'rendered_content', 'user']]);
|
||||
});
|
||||
|
||||
test('authenticated user can post a comment with emoji', function () {
|
||||
$user = User::factory()->create();
|
||||
$artwork = Artwork::factory()->create();
|
||||
|
||||
$this->actingAs($user)
|
||||
->postJson("/api/artworks/{$artwork->id}/comments", [
|
||||
'content' => 'Love this 🚀🔥',
|
||||
])
|
||||
->assertStatus(201)
|
||||
->assertJsonPath('data.raw_content', 'Love this 🚀🔥');
|
||||
|
||||
$comment = ArtworkComment::query()->latest('id')->first();
|
||||
|
||||
expect($comment)->not()->toBeNull()
|
||||
->and($comment->raw_content)->toContain('🚀')
|
||||
->and($comment->rendered_content)->toContain('🚀')
|
||||
->and($comment->rendered_content)->toContain('🔥');
|
||||
});
|
||||
|
||||
test('guest cannot post a comment', function () {
|
||||
$artwork = Artwork::factory()->create();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user