Clone estimates (#97)

* Clone estimates

* Clone estimate test feature

* Resolve namespace

* Fix string to int for Carbon

* Fix homes routes and default queue key

* Move dropdown item below View and use the propper translation key
This commit is contained in:
mchev
2024-06-06 12:16:41 +02:00
committed by GitHub
parent 14c599ed4f
commit bb8258036a
25 changed files with 262 additions and 2 deletions

View File

@@ -65,6 +65,18 @@ test('create estimate', function () {
]);
});
test('clone estimate', function () {
$estimate = Estimate::factory()->create();
$beforeCount = Estimate::count();
$response = $this->post("/api/v1/estimates/{$estimate->id}/clone");
$this->assertDatabaseCount('estimates', $beforeCount + 1);
});
test('store validates using a form request', function () {
$this->assertActionUsesFormRequest(
EstimatesController::class,