mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Fix tests (#2273)
* Update installer script for v3 now that things have moved around. * Make Statuslabel attributes fillable and add them to the generated array. Fixes status label tests.
This commit is contained in:
parent
52425f62c5
commit
68b0bbbec9
|
@ -23,7 +23,7 @@ class Statuslabel extends Model
|
|||
'archived' => 'required',
|
||||
);
|
||||
|
||||
protected $fillable = ['name'];
|
||||
protected $fillable = ['name', 'deployable', 'pending', 'archived'];
|
||||
|
||||
/**
|
||||
* Show count of assets with status label
|
||||
|
|
|
@ -18,6 +18,10 @@ class StatuslabelTest extends \Codeception\TestCase\Test
|
|||
$statuslabel = factory(Statuslabel::class, 'rtd')->make();
|
||||
$values = [
|
||||
'name' => $statuslabel->name,
|
||||
'deployable' => $statuslabel->deployable,
|
||||
'pending' => $statuslabel->pending,
|
||||
'archived' => $statuslabel->archived,
|
||||
|
||||
];
|
||||
|
||||
Statuslabel::create($values);
|
||||
|
@ -29,6 +33,9 @@ class StatuslabelTest extends \Codeception\TestCase\Test
|
|||
$statuslabel = factory(Statuslabel::class, 'pending')->make();
|
||||
$values = [
|
||||
'name' => $statuslabel->name,
|
||||
'deployable' => $statuslabel->deployable,
|
||||
'pending' => $statuslabel->pending,
|
||||
'archived' => $statuslabel->archived,
|
||||
];
|
||||
|
||||
Statuslabel::create($values);
|
||||
|
@ -40,6 +47,9 @@ class StatuslabelTest extends \Codeception\TestCase\Test
|
|||
$statuslabel = factory(Statuslabel::class, 'archived')->make();
|
||||
$values = [
|
||||
'name' => $statuslabel->name,
|
||||
'deployable' => $statuslabel->deployable,
|
||||
'pending' => $statuslabel->pending,
|
||||
'archived' => $statuslabel->archived,
|
||||
];
|
||||
|
||||
Statuslabel::create($values);
|
||||
|
@ -51,6 +61,9 @@ class StatuslabelTest extends \Codeception\TestCase\Test
|
|||
$statuslabel = factory(Statuslabel::class, 'out_for_repair')->make();
|
||||
$values = [
|
||||
'name' => $statuslabel->name,
|
||||
'deployable' => $statuslabel->deployable,
|
||||
'pending' => $statuslabel->pending,
|
||||
'archived' => $statuslabel->archived,
|
||||
];
|
||||
|
||||
Statuslabel::create($values);
|
||||
|
@ -62,6 +75,9 @@ class StatuslabelTest extends \Codeception\TestCase\Test
|
|||
$statuslabel = factory(Statuslabel::class, 'out_for_diagnostics')->make();
|
||||
$values = [
|
||||
'name' => $statuslabel->name,
|
||||
'deployable' => $statuslabel->deployable,
|
||||
'pending' => $statuslabel->pending,
|
||||
'archived' => $statuslabel->archived,
|
||||
];
|
||||
|
||||
Statuslabel::create($values);
|
||||
|
@ -73,6 +89,9 @@ class StatuslabelTest extends \Codeception\TestCase\Test
|
|||
$statuslabel = factory(Statuslabel::class, 'broken')->make();
|
||||
$values = [
|
||||
'name' => $statuslabel->name,
|
||||
'deployable' => $statuslabel->deployable,
|
||||
'pending' => $statuslabel->pending,
|
||||
'archived' => $statuslabel->archived,
|
||||
];
|
||||
|
||||
Statuslabel::create($values);
|
||||
|
@ -84,6 +103,9 @@ class StatuslabelTest extends \Codeception\TestCase\Test
|
|||
$statuslabel = factory(Statuslabel::class, 'lost')->make();
|
||||
$values = [
|
||||
'name' => $statuslabel->name,
|
||||
'deployable' => $statuslabel->deployable,
|
||||
'pending' => $statuslabel->pending,
|
||||
'archived' => $statuslabel->archived,
|
||||
];
|
||||
|
||||
Statuslabel::create($values);
|
||||
|
|
Loading…
Reference in a new issue