create(); $player = factory(Player::class)->create(); $owner = $player->user; $this->actingAs($other_user) ->get('/user/player') ->assertSuccessful(); $this->actingAs($other_user) ->postJson('/user/player/rename/'.$player->pid) ->assertJson([ 'code' => 1, 'message' => trans('admin.players.no-permission'), ]); } }