mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 14:27:33 -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',
|
'archived' => 'required',
|
||||||
);
|
);
|
||||||
|
|
||||||
protected $fillable = ['name'];
|
protected $fillable = ['name', 'deployable', 'pending', 'archived'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show count of assets with status label
|
* Show count of assets with status label
|
||||||
|
|
|
@ -17,7 +17,11 @@ class StatuslabelTest extends \Codeception\TestCase\Test
|
||||||
{
|
{
|
||||||
$statuslabel = factory(Statuslabel::class, 'rtd')->make();
|
$statuslabel = factory(Statuslabel::class, 'rtd')->make();
|
||||||
$values = [
|
$values = [
|
||||||
'name' => $statuslabel->name,
|
'name' => $statuslabel->name,
|
||||||
|
'deployable' => $statuslabel->deployable,
|
||||||
|
'pending' => $statuslabel->pending,
|
||||||
|
'archived' => $statuslabel->archived,
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
Statuslabel::create($values);
|
Statuslabel::create($values);
|
||||||
|
@ -28,7 +32,10 @@ class StatuslabelTest extends \Codeception\TestCase\Test
|
||||||
{
|
{
|
||||||
$statuslabel = factory(Statuslabel::class, 'pending')->make();
|
$statuslabel = factory(Statuslabel::class, 'pending')->make();
|
||||||
$values = [
|
$values = [
|
||||||
'name' => $statuslabel->name,
|
'name' => $statuslabel->name,
|
||||||
|
'deployable' => $statuslabel->deployable,
|
||||||
|
'pending' => $statuslabel->pending,
|
||||||
|
'archived' => $statuslabel->archived,
|
||||||
];
|
];
|
||||||
|
|
||||||
Statuslabel::create($values);
|
Statuslabel::create($values);
|
||||||
|
@ -39,7 +46,10 @@ class StatuslabelTest extends \Codeception\TestCase\Test
|
||||||
{
|
{
|
||||||
$statuslabel = factory(Statuslabel::class, 'archived')->make();
|
$statuslabel = factory(Statuslabel::class, 'archived')->make();
|
||||||
$values = [
|
$values = [
|
||||||
'name' => $statuslabel->name,
|
'name' => $statuslabel->name,
|
||||||
|
'deployable' => $statuslabel->deployable,
|
||||||
|
'pending' => $statuslabel->pending,
|
||||||
|
'archived' => $statuslabel->archived,
|
||||||
];
|
];
|
||||||
|
|
||||||
Statuslabel::create($values);
|
Statuslabel::create($values);
|
||||||
|
@ -50,7 +60,10 @@ class StatuslabelTest extends \Codeception\TestCase\Test
|
||||||
{
|
{
|
||||||
$statuslabel = factory(Statuslabel::class, 'out_for_repair')->make();
|
$statuslabel = factory(Statuslabel::class, 'out_for_repair')->make();
|
||||||
$values = [
|
$values = [
|
||||||
'name' => $statuslabel->name,
|
'name' => $statuslabel->name,
|
||||||
|
'deployable' => $statuslabel->deployable,
|
||||||
|
'pending' => $statuslabel->pending,
|
||||||
|
'archived' => $statuslabel->archived,
|
||||||
];
|
];
|
||||||
|
|
||||||
Statuslabel::create($values);
|
Statuslabel::create($values);
|
||||||
|
@ -61,7 +74,10 @@ class StatuslabelTest extends \Codeception\TestCase\Test
|
||||||
{
|
{
|
||||||
$statuslabel = factory(Statuslabel::class, 'out_for_diagnostics')->make();
|
$statuslabel = factory(Statuslabel::class, 'out_for_diagnostics')->make();
|
||||||
$values = [
|
$values = [
|
||||||
'name' => $statuslabel->name,
|
'name' => $statuslabel->name,
|
||||||
|
'deployable' => $statuslabel->deployable,
|
||||||
|
'pending' => $statuslabel->pending,
|
||||||
|
'archived' => $statuslabel->archived,
|
||||||
];
|
];
|
||||||
|
|
||||||
Statuslabel::create($values);
|
Statuslabel::create($values);
|
||||||
|
@ -72,7 +88,10 @@ class StatuslabelTest extends \Codeception\TestCase\Test
|
||||||
{
|
{
|
||||||
$statuslabel = factory(Statuslabel::class, 'broken')->make();
|
$statuslabel = factory(Statuslabel::class, 'broken')->make();
|
||||||
$values = [
|
$values = [
|
||||||
'name' => $statuslabel->name,
|
'name' => $statuslabel->name,
|
||||||
|
'deployable' => $statuslabel->deployable,
|
||||||
|
'pending' => $statuslabel->pending,
|
||||||
|
'archived' => $statuslabel->archived,
|
||||||
];
|
];
|
||||||
|
|
||||||
Statuslabel::create($values);
|
Statuslabel::create($values);
|
||||||
|
@ -83,7 +102,10 @@ class StatuslabelTest extends \Codeception\TestCase\Test
|
||||||
{
|
{
|
||||||
$statuslabel = factory(Statuslabel::class, 'lost')->make();
|
$statuslabel = factory(Statuslabel::class, 'lost')->make();
|
||||||
$values = [
|
$values = [
|
||||||
'name' => $statuslabel->name,
|
'name' => $statuslabel->name,
|
||||||
|
'deployable' => $statuslabel->deployable,
|
||||||
|
'pending' => $statuslabel->pending,
|
||||||
|
'archived' => $statuslabel->archived,
|
||||||
];
|
];
|
||||||
|
|
||||||
Statuslabel::create($values);
|
Statuslabel::create($values);
|
||||||
|
|
Loading…
Reference in a new issue