A free open source IT asset/license management system
Re-order tests
Marcus Moore2df39aa9fb2a
diff --git a/tests/Feature/Reporting/Custom/CustomComponentReportTest.php b/tests/Feature/Reporting/Custom/CustomComponentReportTest.phpindex de2f1365a1..ce81538daa 100644--- a/tests/Feature/Reporting/Custom/CustomComponentReportTest.php+++ b/tests/Feature/Reporting/Custom/CustomComponentReportTest.php@@ -160,54 +160,54 @@ class CustomComponentReportTest extends TestCase// todo: ensure only the items checked are included in the output}- public function test_limiting_by_category()+ public function test_limiting_by_company(){- [$categoryA, $categoryB] = Category::factory()->count(2)->create()->all();+ [$companyA, $companyB] = Company::factory()->count(2)->create()->all();Component::factory()->count(2)->sequence(- ['category_id' => $categoryA->id, 'name' => 'Component for Category A'],- ['category_id' => $categoryB->id, 'name' => 'Component for Category B'],+ ['company_id' => $companyA->id, 'name' => 'Component for Company A'],+ ['company_id' => $companyB->id, 'name' => 'Component for Company B'],)->create();$this->sendRequest(['component_name' => '1',- 'category' => '1',- 'by_category_id' => [- $categoryA->id,+ 'company' => '1',+ 'by_company_id' => [+ $companyA->id,],])->assertOk()->assertCsvHeader()- ->assertSeeTextInStreamedResponse('Component for Category A')- ->assertDontSeeTextInStreamedResponse('Component for Category B');+ ->assertSeeTextInStreamedResponse('Component for Company A')+ ->assertDontSeeTextInStreamedResponse('Component for Company B');}- public function test_limiting_by_company()+ public function test_limiting_by_category(){- [$companyA, $companyB] = Company::factory()->count(2)->create()->all();+ [$categoryA, $categoryB] = Category::factory()->count(2)->create()->all();Component::factory()->count(2)->sequence(- ['company_id' => $companyA->id, 'name' => 'Component for Company A'],- ['company_id' => $companyB->id, 'name' => 'Component for Company B'],+ ['category_id' => $categoryA->id, 'name' => 'Component for Category A'],+ ['category_id' => $categoryB->id, 'name' => 'Component for Category B'],)->create();$this->sendRequest(['component_name' => '1',- 'company' => '1',- 'by_company_id' => [- $companyA->id,+ 'category' => '1',+ 'by_category_id' => [+ $categoryA->id,],])->assertOk()->assertCsvHeader()- ->assertSeeTextInStreamedResponse('Component for Company A')- ->assertDontSeeTextInStreamedResponse('Component for Company B');+ ->assertSeeTextInStreamedResponse('Component for Category A')+ ->assertDontSeeTextInStreamedResponse('Component for Category B');}public function test_limiting_by_manufacturer()@@ -235,22 +235,6 @@ class CustomComponentReportTest extends TestCase->assertDontSeeTextInStreamedResponse('Component for Manufacturer B');}- public function test_limiting_by_model_number()- {- Component::factory()->create(['model_number' => 'MODEL-001']);- Component::factory()->create(['model_number' => 'MODEL-002']);-- $this->sendRequest([- 'component_name' => '1',- 'model' => '1',- 'by_model_number' => 'MODEL-001',- ])- ->assertOk()- ->assertCsvHeader()- ->assertSeeTextInStreamedResponse('MODEL-001')- ->assertDontSeeTextInStreamedResponse('MODEL-002');- }-public function test_limiting_by_supplier(){$this->markTestIncomplete();@@ -322,6 +306,22 @@ class CustomComponentReportTest extends TestCase->assertDontSeeTextInStreamedResponse('Hard Drive');}+ public function test_limiting_by_model_number()+ {+ Component::factory()->create(['model_number' => 'MODEL-001']);+ Component::factory()->create(['model_number' => 'MODEL-002']);++ $this->sendRequest([+ 'component_name' => '1',+ 'model' => '1',+ 'by_model_number' => 'MODEL-001',+ ])+ ->assertOk()+ ->assertCsvHeader()+ ->assertSeeTextInStreamedResponse('MODEL-001')+ ->assertDontSeeTextInStreamedResponse('MODEL-002');+ }+public function test_limiting_by_order_number(){$this->markTestIncomplete();