Account show test added

This commit is contained in:
Cihan Şentürk 2021-11-10 14:03:32 +03:00
parent e963a69a33
commit ce923d295b

View File

@ -82,6 +82,18 @@ class AccountsTest extends FeatureTestCase
$this->assertSoftDeleted('accounts', $request); $this->assertSoftDeleted('accounts', $request);
} }
public function testItShouldShowAccount()
{
$request = $this->getRequest();
$account = $this->dispatch(new CreateAccount($request));
$this->loginAs()
->get(route('accounts.show', $account->id))
->assertStatus(200)
->assertSee($account->name);
}
public function getRequest() public function getRequest()
{ {
return Account::factory()->enabled()->raw(); return Account::factory()->enabled()->raw();