mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Updated tests for new RMB behavior
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
e0beed0fa3
commit
54cc427ef5
|
@ -26,7 +26,7 @@ class ShowAccessoryTest extends TestCase
|
|||
|
||||
$this->actingAs($userForCompanyB)
|
||||
->get(route('accessories.show', $accessoryForCompanyA))
|
||||
->assertForbidden();
|
||||
->assertStatus(302);
|
||||
}
|
||||
|
||||
public function testCanViewAccessory()
|
||||
|
|
|
@ -54,7 +54,7 @@ class UpdateConsumableTest extends TestCase
|
|||
->put(route('consumables.update', $consumableForCompanyA), [
|
||||
//
|
||||
])
|
||||
->assertForbidden();
|
||||
->assertStatus(302);
|
||||
}
|
||||
|
||||
public function testCannotSetQuantityToAmountLowerThanWhatIsCheckedOut()
|
||||
|
|
|
@ -17,7 +17,7 @@ class DeleteReportTemplateTest extends TestCase implements TestsPermissionsRequi
|
|||
|
||||
$this->actingAs(User::factory()->create())
|
||||
->post(route('report-templates.destroy', $reportTemplate->id))
|
||||
->assertNotFound();
|
||||
->assertStatus(302);
|
||||
|
||||
$this->assertModelExists($reportTemplate);
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ class DeleteReportTemplateTest extends TestCase implements TestsPermissionsRequi
|
|||
|
||||
$this->actingAs(User::factory()->canViewReports()->create())
|
||||
->delete(route('report-templates.destroy', $reportTemplate->id))
|
||||
->assertNotFound();
|
||||
->assertStatus(302);
|
||||
|
||||
$this->assertModelExists($reportTemplate);
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ class EditReportTemplateTest extends TestCase implements TestsPermissionsRequire
|
|||
{
|
||||
$this->actingAs(User::factory()->create())
|
||||
->get(route('report-templates.edit', ReportTemplate::factory()->create()))
|
||||
->assertNotFound();
|
||||
->assertStatus(302);
|
||||
}
|
||||
|
||||
public function testCannotLoadEditPageForAnotherUsersReportTemplate()
|
||||
|
@ -25,7 +25,7 @@ class EditReportTemplateTest extends TestCase implements TestsPermissionsRequire
|
|||
|
||||
$this->actingAs($user)
|
||||
->get(route('report-templates.edit', $reportTemplate))
|
||||
->assertNotFound();
|
||||
->assertStatus(302);
|
||||
}
|
||||
|
||||
public function testCanLoadEditReportTemplatePage()
|
||||
|
|
|
@ -15,7 +15,7 @@ class ShowReportTemplateTest extends TestCase implements TestsPermissionsRequire
|
|||
{
|
||||
$this->actingAs(User::factory()->create())
|
||||
->get(route('report-templates.show', ReportTemplate::factory()->create()))
|
||||
->assertNotFound();
|
||||
->assertStatus(302);
|
||||
}
|
||||
|
||||
public function testCanLoadASavedReportTemplate()
|
||||
|
@ -38,6 +38,6 @@ class ShowReportTemplateTest extends TestCase implements TestsPermissionsRequire
|
|||
|
||||
$this->actingAs(User::factory()->canViewReports()->create())
|
||||
->get(route('report-templates.show', $reportTemplate))
|
||||
->assertNotFound();
|
||||
->assertStatus(302);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,14 +15,14 @@ class UpdateReportTemplateTest extends TestCase implements TestsPermissionsRequi
|
|||
{
|
||||
$this->actingAs(User::factory()->create())
|
||||
->post(route('report-templates.update', ReportTemplate::factory()->create()))
|
||||
->assertNotFound();
|
||||
->assertStatus(302);
|
||||
}
|
||||
|
||||
public function testCannotUpdateAnotherUsersReportTemplate()
|
||||
{
|
||||
$this->actingAs(User::factory()->canViewReports()->create())
|
||||
->post(route('report-templates.update', ReportTemplate::factory()->create()))
|
||||
->assertNotFound();
|
||||
->assertStatus(302);
|
||||
}
|
||||
|
||||
public function testUpdatingReportTemplateRequiresValidFields()
|
||||
|
|
|
@ -21,7 +21,7 @@ class ViewUserTest extends TestCase
|
|||
|
||||
$this->actingAs(User::factory()->editUsers()->for($companyA)->create())
|
||||
->get(route('users.show', $user))
|
||||
->assertStatus(403);
|
||||
->assertStatus(302);
|
||||
|
||||
$this->actingAs($superuser)
|
||||
->get(route('users.show', $user))
|
||||
|
|
Loading…
Reference in a new issue