mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Fixed status labels tests
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
872bd29cb3
commit
1e46fde5e2
|
@ -16,100 +16,37 @@ class StatuslabelTest extends BaseTest
|
|||
|
||||
public function testRTDStatuslabelAdd()
|
||||
{
|
||||
$statuslabel = Statuslabel::factory()->rtd()->make();
|
||||
$values = [
|
||||
'name' => $statuslabel->name,
|
||||
'deployable' => $statuslabel->deployable,
|
||||
'pending' => $statuslabel->pending,
|
||||
'archived' => $statuslabel->archived,
|
||||
|
||||
];
|
||||
|
||||
Statuslabel::create($values);
|
||||
$this->tester->seeRecord('status_labels', $values);
|
||||
$statuslabel = Statuslabel::factory()->rtd()->create();
|
||||
$this->assertModelExists($statuslabel);
|
||||
}
|
||||
|
||||
public function testPendingStatuslabelAdd()
|
||||
{
|
||||
$statuslabel = Statuslabel::factory()->pending()->make();
|
||||
$values = [
|
||||
'name' => $statuslabel->name,
|
||||
'deployable' => $statuslabel->deployable,
|
||||
'pending' => $statuslabel->pending,
|
||||
'archived' => $statuslabel->archived,
|
||||
];
|
||||
|
||||
Statuslabel::create($values);
|
||||
$this->tester->seeRecord('status_labels', $values);
|
||||
$statuslabel = Statuslabel::factory()->pending()->create();
|
||||
$this->assertModelExists($statuslabel);
|
||||
}
|
||||
|
||||
public function testArchivedStatuslabelAdd()
|
||||
{
|
||||
$statuslabel = Statuslabel::factory()->archived()->make();
|
||||
$values = [
|
||||
'name' => $statuslabel->name,
|
||||
'deployable' => $statuslabel->deployable,
|
||||
'pending' => $statuslabel->pending,
|
||||
'archived' => $statuslabel->archived,
|
||||
];
|
||||
|
||||
Statuslabel::create($values);
|
||||
$this->tester->seeRecord('status_labels', $values);
|
||||
$statuslabel = Statuslabel::factory()->archived()->create();
|
||||
$this->assertModelExists($statuslabel);
|
||||
}
|
||||
|
||||
public function testOutForRepairStatuslabelAdd()
|
||||
{
|
||||
$statuslabel = Statuslabel::factory()->outForRepair()->make();
|
||||
$values = [
|
||||
'name' => $statuslabel->name,
|
||||
'deployable' => $statuslabel->deployable,
|
||||
'pending' => $statuslabel->pending,
|
||||
'archived' => $statuslabel->archived,
|
||||
];
|
||||
|
||||
Statuslabel::create($values);
|
||||
$this->tester->seeRecord('status_labels', $values);
|
||||
}
|
||||
|
||||
public function testOutForDiagnosticsStatuslabelAdd()
|
||||
{
|
||||
$statuslabel = Statuslabel::factory()->outForDiagnostics()->make();
|
||||
$values = [
|
||||
'name' => $statuslabel->name,
|
||||
'deployable' => $statuslabel->deployable,
|
||||
'pending' => $statuslabel->pending,
|
||||
'archived' => $statuslabel->archived,
|
||||
];
|
||||
|
||||
Statuslabel::create($values);
|
||||
$this->tester->seeRecord('status_labels', $values);
|
||||
$statuslabel = Statuslabel::factory()->outForRepair()->create();
|
||||
$this->assertModelExists($statuslabel);
|
||||
}
|
||||
|
||||
public function testBrokenStatuslabelAdd()
|
||||
{
|
||||
$statuslabel = Statuslabel::factory()->broken()->make();
|
||||
$values = [
|
||||
'name' => $statuslabel->name,
|
||||
'deployable' => $statuslabel->deployable,
|
||||
'pending' => $statuslabel->pending,
|
||||
'archived' => $statuslabel->archived,
|
||||
];
|
||||
|
||||
Statuslabel::create($values);
|
||||
$this->tester->seeRecord('status_labels', $values);
|
||||
$statuslabel = Statuslabel::factory()->broken()->create();
|
||||
$this->assertModelExists($statuslabel);
|
||||
}
|
||||
|
||||
public function testLostStatuslabelAdd()
|
||||
{
|
||||
$statuslabel = Statuslabel::factory()->lost()->make();
|
||||
$values = [
|
||||
'name' => $statuslabel->name,
|
||||
'deployable' => $statuslabel->deployable,
|
||||
'pending' => $statuslabel->pending,
|
||||
'archived' => $statuslabel->archived,
|
||||
];
|
||||
|
||||
Statuslabel::create($values);
|
||||
$this->tester->seeRecord('status_labels', $values);
|
||||
$statuslabel = Statuslabel::factory()->lost()->create();
|
||||
$this->assertModelExists($statuslabel);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue