From 7331c2985b317c6203c678fc1fe878621a2363b7 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 18 Sep 2022 10:15:51 +1000 Subject: [PATCH] Fixes for tests --- .../Payments/StorePaymentValidationTest.php | 3 + tests/Feature/TaskStatusSortOnUpdateTest.php | 92 ------------------- 2 files changed, 3 insertions(+), 92 deletions(-) delete mode 100644 tests/Feature/TaskStatusSortOnUpdateTest.php diff --git a/tests/Feature/Payments/StorePaymentValidationTest.php b/tests/Feature/Payments/StorePaymentValidationTest.php index 8b72e985ac1e..1dce4cbd6b5e 100644 --- a/tests/Feature/Payments/StorePaymentValidationTest.php +++ b/tests/Feature/Payments/StorePaymentValidationTest.php @@ -215,5 +215,8 @@ class StorePaymentValidationTest extends TestCase } catch (ValidationException $e) { $response->assertStatus(302); } + + $response->assertStatus(302); + } } diff --git a/tests/Feature/TaskStatusSortOnUpdateTest.php b/tests/Feature/TaskStatusSortOnUpdateTest.php deleted file mode 100644 index 3b1f57e5ad3a..000000000000 --- a/tests/Feature/TaskStatusSortOnUpdateTest.php +++ /dev/null @@ -1,92 +0,0 @@ -makeTestData(); - - $this->withoutMiddleware( - ThrottleRequests::class - ); - } - - // public function testTasksSort() - // { - - // $project = Project::factory()->create([ - // 'user_id' => $this->user->id, - // 'company_id' => $this->company->id, - // 'name' => 'Test Project', - // ]); - - // for($x=0; $x<10; $x++) - // { - // $task = Task::factory()->create([ - // 'user_id' => $this->user->id, - // 'company_id' => $this->company->id, - // 'project_id' => $project->id - // ]); - - // $task->status_id = TaskStatus::where('company_id', $this->company->id)->first()->id; - // $task->save(); - // } - - // $this->assertTrue($task->project()->exists()); - // $this->assertEquals($task->project->tasks->count(), 10); - - // $task->status_order = 1; - - // $response = $this->withHeaders([ - // 'X-API-SECRET' => config('ninja.api_secret'), - // 'X-API-TOKEN' => $this->token, - // ])->put('/api/v1/tasks/'.$this->encodePrimaryKey($task->id), $task->toArray()); - - // $response->assertStatus(200); - - // $this->assertEquals($task->fresh()->status_order, 1); - - // $task->status_order = 10; - - // $response = $this->withHeaders([ - // 'X-API-SECRET' => config('ninja.api_secret'), - // 'X-API-TOKEN' => $this->token, - // ])->put('/api/v1/tasks/'.$this->encodePrimaryKey($task->id), $task->toArray()); - - // $response->assertStatus(200); - - // nlog($task->fresh()->project->tasks->toArray()); - - // $this->assertEquals($task->fresh()->status_order, 9); - - // } -}