diff --git a/tests/Feature/Purchases/BillsTest.php b/tests/Feature/Purchases/BillsTest.php index 74c5f25e5..2eabf3044 100644 --- a/tests/Feature/Purchases/BillsTest.php +++ b/tests/Feature/Purchases/BillsTest.php @@ -19,6 +19,18 @@ class BillsTest extends FeatureTestCase ->assertSeeText(trans_choice('general.bills', 2)); } + public function testItShouldSeeBillShowPage() + { + $request = $this->getRequest(); + + $bill = $this->dispatch(new CreateDocument($request)); + + $this->loginAs() + ->get(route('bills.show', $bill->id)) + ->assertStatus(200) + ->assertSee($bill->contact_email); + } + public function testItShouldSeeBillCreatePage() { $this->loginAs() diff --git a/tests/Feature/Purchases/PaymentsTest.php b/tests/Feature/Purchases/PaymentsTest.php index 46101dc01..630a61b00 100644 --- a/tests/Feature/Purchases/PaymentsTest.php +++ b/tests/Feature/Purchases/PaymentsTest.php @@ -18,6 +18,17 @@ class PaymentsTest extends FeatureTestCase ->assertStatus(200) ->assertSeeText(trans_choice('general.payments', 2)); } + public function testItShouldSeePaymentShowPage() + { + $request = $this->getRequest(); + + $payment = $this->dispatch(new CreateTransaction($request)); + + $this->loginAs() + ->get(route('payments.show', $payment->id)) + ->assertStatus(200) + ->assertSee($payment->contact->email); + } public function testItShouldSeePaymentCreatePage() { diff --git a/tests/Feature/Purchases/VendorsTest.php b/tests/Feature/Purchases/VendorsTest.php index 064479742..ccbf58f4c 100644 --- a/tests/Feature/Purchases/VendorsTest.php +++ b/tests/Feature/Purchases/VendorsTest.php @@ -19,6 +19,18 @@ class VendorsTest extends FeatureTestCase ->assertSeeText(trans_choice('general.vendors', 2)); } + public function testItShouldSeeVendorShowPage() + { + $request = $this->getRequest(); + + $vendor = $this->dispatch(new CreateContact($request)); + + $this->loginAs() + ->get(route('vendors.show', $vendor->id)) + ->assertStatus(200) + ->assertSee($vendor->email); + } + public function testItShouldSeeVendorCreatePage() { $this->loginAs() diff --git a/tests/Feature/Sales/CustomersTest.php b/tests/Feature/Sales/CustomersTest.php index 14b7153a6..81b7db7a0 100644 --- a/tests/Feature/Sales/CustomersTest.php +++ b/tests/Feature/Sales/CustomersTest.php @@ -20,6 +20,18 @@ class CustomersTest extends FeatureTestCase ->assertSeeText(trans_choice('general.customers', 2)); } + public function testItShouldSeeCustomerShowPage() + { + $request = $this->getRequest(); + + $customer = $this->dispatch(new CreateContact($request)); + + $this->loginAs() + ->get(route('customers.show', $customer->id)) + ->assertStatus(200) + ->assertSee($customer->email); + } + public function testItShouldSeeCustomerCreatePage() { $this->loginAs() diff --git a/tests/Feature/Sales/InvoicesTest.php b/tests/Feature/Sales/InvoicesTest.php index d6ad4254a..7a4e64731 100644 --- a/tests/Feature/Sales/InvoicesTest.php +++ b/tests/Feature/Sales/InvoicesTest.php @@ -19,6 +19,18 @@ class InvoicesTest extends FeatureTestCase ->assertSeeText(trans_choice('general.invoices', 2)); } + public function testItShouldSeeInvoiceShowPage() + { + $request = $this->getRequest(); + + $invoice = $this->dispatch(new CreateDocument($request)); + + $this->loginAs() + ->get(route('invoices.show', $invoice->id)) + ->assertStatus(200) + ->assertSee($invoice->contact_email); + } + public function testItShouldSeeInvoiceCreatePage() { $this->loginAs() diff --git a/tests/Feature/Sales/RevenuesTest.php b/tests/Feature/Sales/RevenuesTest.php index ca37b8606..523df3a1e 100644 --- a/tests/Feature/Sales/RevenuesTest.php +++ b/tests/Feature/Sales/RevenuesTest.php @@ -19,6 +19,18 @@ class RevenuesTest extends FeatureTestCase ->assertSeeText(trans_choice('general.revenues', 2)); } + public function testItShouldSeeRevenueShowPage() + { + $request = $this->getRequest(); + + $revenue = $this->dispatch(new CreateTransaction($request)); + + $this->loginAs() + ->get(route('revenues.show', $revenue->id)) + ->assertStatus(200) + ->assertSee($revenue->contact->email); + } + public function testItShouldSeeRevenueCreatePage() { $this->loginAs()