* 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:
Daniel Meltzer 2016-07-19 18:50:21 -04:00 committed by snipe
parent 52425f62c5
commit 68b0bbbec9
2 changed files with 30 additions and 8 deletions

View file

@ -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

View file

@ -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);