has(Wallet::factory()->richChillGuy()) ->create(['name' => 'John Doe', 'email' => 'test@test.com']); actingAs($user); getJson(action(AccountController::class)) ->assertOk() ->assertJson([ 'data' => [ 'id' => $user->id, 'name' => 'John Doe', 'email' => $user->email, 'balance' => 1_000_000, ], ]); }); test('must be authenticated to get account data', function () { getJson(action(AccountController::class)) ->assertUnauthorized(); });