feat: translation codes
This commit is contained in:
@@ -21,7 +21,7 @@ it('blocks a user idempotently, removes follows, lists the block, and unblocks',
|
||||
|
||||
$this->postJson("/api/users/{$blocked->id}/block")
|
||||
->assertOk()
|
||||
->assertJsonPath('message', __('api.blocks.blocked'));
|
||||
->assertJsonPath('code', 'USER_BLOCKED');
|
||||
|
||||
$this->postJson("/api/users/{$blocked->id}/block")->assertOk();
|
||||
|
||||
@@ -46,7 +46,7 @@ it('does not allow a user to block themselves', function () {
|
||||
|
||||
$this->postJson("/api/users/{$user->id}/block")
|
||||
->assertUnprocessable()
|
||||
->assertJsonPath('message', __('api.blocks.cannot_block_self'));
|
||||
->assertJsonPath('code', 'CANNOT_BLOCK_SELF');
|
||||
});
|
||||
|
||||
it('requires authentication to manage blocks', function () {
|
||||
|
||||
Reference in New Issue
Block a user