improved should update test
This commit is contained in:
parent
7ef3f0a283
commit
548bb65a57
@ -50,11 +50,12 @@ class PermissionsTest extends FeatureTestCase
|
|||||||
|
|
||||||
$permission = $this->dispatch(new CreatePermission($request));
|
$permission = $this->dispatch(new CreatePermission($request));
|
||||||
|
|
||||||
$request['name'] = $this->faker->name;
|
$request['display_name'] = $this->faker->word;
|
||||||
|
|
||||||
$this->loginAs()
|
$this->loginAs()
|
||||||
->patch(route('permissions.update', $permission->id), $request)
|
->patch(route('permissions.update', $permission->id), $request)
|
||||||
->assertStatus(200);
|
->assertStatus(200)
|
||||||
|
->assertSee($request['display_name']);
|
||||||
|
|
||||||
$this->assertFlashLevel('success');
|
$this->assertFlashLevel('success');
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,8 @@ class UsersTest extends FeatureTestCase
|
|||||||
|
|
||||||
$this->loginAs()
|
$this->loginAs()
|
||||||
->patch(route('users.update', $user->id), $request)
|
->patch(route('users.update', $user->id), $request)
|
||||||
->assertStatus(200);
|
->assertStatus(200)
|
||||||
|
->assertSee($request['name']);
|
||||||
|
|
||||||
$this->assertFlashLevel('success');
|
$this->assertFlashLevel('success');
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,8 @@ class AccountsTest extends FeatureTestCase
|
|||||||
|
|
||||||
$this->loginAs()
|
$this->loginAs()
|
||||||
->patch(route('accounts.update', $account->id), $request)
|
->patch(route('accounts.update', $account->id), $request)
|
||||||
->assertStatus(200);
|
->assertStatus(200)
|
||||||
|
->assertSee($request['name']);
|
||||||
|
|
||||||
$this->assertFlashLevel('success');
|
$this->assertFlashLevel('success');
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,8 @@ class DashboardsTest extends FeatureTestCase
|
|||||||
|
|
||||||
$this->loginAs()
|
$this->loginAs()
|
||||||
->patch(route('dashboards.update', $dashboard->id), $request)
|
->patch(route('dashboards.update', $dashboard->id), $request)
|
||||||
->assertStatus(200);
|
->assertStatus(200)
|
||||||
|
->assertSee($request['name']);
|
||||||
|
|
||||||
$this->assertFlashLevel('success');
|
$this->assertFlashLevel('success');
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,8 @@ class ItemsTest extends FeatureTestCase
|
|||||||
|
|
||||||
$this->loginAs()
|
$this->loginAs()
|
||||||
->patch(route('items.update', $item->id), $request)
|
->patch(route('items.update', $item->id), $request)
|
||||||
->assertStatus(200);
|
->assertStatus(200)
|
||||||
|
->assertSee($request['name']);
|
||||||
|
|
||||||
$this->assertFlashLevel('success');
|
$this->assertFlashLevel('success');
|
||||||
}
|
}
|
||||||
|
@ -49,11 +49,12 @@ class PaymentsTest extends FeatureTestCase
|
|||||||
|
|
||||||
$payment = $this->dispatch(new CreateTransaction($request));
|
$payment = $this->dispatch(new CreateTransaction($request));
|
||||||
|
|
||||||
$request['name'] = $this->faker->text(15);
|
$request['amount'] = $this->faker->randomFloat(2, 1, 1000);
|
||||||
|
|
||||||
$this->loginAs()
|
$this->loginAs()
|
||||||
->patch(route('payments.update', $payment->id), $request)
|
->patch(route('payments.update', $payment->id), $request)
|
||||||
->assertStatus(200);
|
->assertStatus(200)
|
||||||
|
->assertSee($request['amount']);
|
||||||
|
|
||||||
$this->assertFlashLevel('success');
|
$this->assertFlashLevel('success');
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,8 @@ class VendorsTest extends FeatureTestCase
|
|||||||
|
|
||||||
$this->loginAs()
|
$this->loginAs()
|
||||||
->patch(route('vendors.update', $vendor->id), $request)
|
->patch(route('vendors.update', $vendor->id), $request)
|
||||||
->assertStatus(200);
|
->assertStatus(200)
|
||||||
|
->assertSee($request['name']);
|
||||||
|
|
||||||
$this->assertFlashLevel('success');
|
$this->assertFlashLevel('success');
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,8 @@ class CustomersTest extends FeatureTestCase
|
|||||||
|
|
||||||
$this->loginAs()
|
$this->loginAs()
|
||||||
->patch(route('customers.update', $customer->id), $request)
|
->patch(route('customers.update', $customer->id), $request)
|
||||||
->assertStatus(200);
|
->assertStatus(200)
|
||||||
|
->assertSee($request['name']);
|
||||||
|
|
||||||
$this->assertFlashLevel('success');
|
$this->assertFlashLevel('success');
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,8 @@ class InvoicesTest extends FeatureTestCase
|
|||||||
|
|
||||||
$this->loginAs()
|
$this->loginAs()
|
||||||
->patch(route('invoices.update', $invoice->id), $request)
|
->patch(route('invoices.update', $invoice->id), $request)
|
||||||
->assertStatus(200);
|
->assertStatus(200)
|
||||||
|
->assertSee($request['contact_name']);
|
||||||
|
|
||||||
$this->assertFlashLevel('success');
|
$this->assertFlashLevel('success');
|
||||||
}
|
}
|
||||||
|
@ -49,11 +49,12 @@ class RevenuesTest extends FeatureTestCase
|
|||||||
|
|
||||||
$revenue = $this->dispatch(new CreateTransaction($request));
|
$revenue = $this->dispatch(new CreateTransaction($request));
|
||||||
|
|
||||||
$request['name'] = $this->faker->text(15);
|
$request['amount'] = $this->faker->randomFloat(2, 1, 1000);
|
||||||
|
|
||||||
$this->loginAs()
|
$this->loginAs()
|
||||||
->patch(route('revenues.update', $revenue->id), $request)
|
->patch(route('revenues.update', $revenue->id), $request)
|
||||||
->assertStatus(200);
|
->assertStatus(200)
|
||||||
|
->assertSee($request['amount']);
|
||||||
|
|
||||||
$this->assertFlashLevel('success');
|
$this->assertFlashLevel('success');
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,8 @@ class CategoriesTest extends FeatureTestCase
|
|||||||
|
|
||||||
$this->loginAs()
|
$this->loginAs()
|
||||||
->patch(route('categories.update', $category->id), $request)
|
->patch(route('categories.update', $category->id), $request)
|
||||||
->assertStatus(200);
|
->assertStatus(200)
|
||||||
|
->assertSee($request['name']);
|
||||||
|
|
||||||
$this->assertFlashLevel('success');
|
$this->assertFlashLevel('success');
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,8 @@ class CurrenciesTest extends FeatureTestCase
|
|||||||
|
|
||||||
$this->loginAs()
|
$this->loginAs()
|
||||||
->patch(route('currencies.update', $currency->id), $request)
|
->patch(route('currencies.update', $currency->id), $request)
|
||||||
->assertStatus(200);
|
->assertStatus(200)
|
||||||
|
->assertSee($request['name']);
|
||||||
|
|
||||||
$this->assertFlashLevel('success');
|
$this->assertFlashLevel('success');
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,8 @@ class TaxesTest extends FeatureTestCase
|
|||||||
|
|
||||||
$this->loginAs()
|
$this->loginAs()
|
||||||
->patch(route('taxes.update', $tax->id), $request)
|
->patch(route('taxes.update', $tax->id), $request)
|
||||||
->assertStatus(200);
|
->assertStatus(200)
|
||||||
|
->assertSee($request['name']);
|
||||||
|
|
||||||
$this->assertFlashLevel('success');
|
$this->assertFlashLevel('success');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user