Skip to content

A free open source IT asset/license management system

Started to fix some of the URLs and routes in test (#3066)

snipe8faffb188902
diff --git a/tests/functional/AccessoriesCest.php b/tests/functional/AccessoriesCest.php
index ea34e83d9a..a3087becd7 100644
--- a/tests/functional/AccessoriesCest.php
+++ b/tests/functional/AccessoriesCest.php
@@ -76,7 +76,7 @@ class AccessoriesCest
public function allowsDelete(FunctionalTester $I)
{
$I->wantTo('Ensure I can delete an accessory');
- $I->amOnPage( route('delete/accessory', $I->getAccessoryId() ) );
+ $I->amOnPage( route('accessories.destroy', $I->getAccessoryId() ) );
$I->seeElement('.alert-success');
}
}
diff --git a/tests/functional/AssetsCest.php b/tests/functional/AssetsCest.php
index 5f44b8c08d..a19067fffe 100644
--- a/tests/functional/AssetsCest.php
+++ b/tests/functional/AssetsCest.php
@@ -23,7 +23,7 @@ class AssetsCest
public function failsEmptyValidation(FunctionalTester $I)
{
$I->wantTo("Test Validation Fails with blank elements");
- $I->amOnPage(route('create/hardware'));
+ $I->amOnPage(route('hardware.create'));
$I->click('Save');
$I->seeElement('.alert-danger');
$I->see('The asset tag field is required.', '.alert-msg');
@@ -52,7 +52,7 @@ class AssetsCest
'requestable' => $asset->requestable,
];
$I->wantTo("Test Validation Succeeds");
- $I->amOnPage(route('create/hardware'));
+ $I->amOnPage(route('hardware.create'));
$I->submitForm('form#create-form', $values);
$I->seeRecord('assets', $values);
$I->dontSeeElement('.alert-danger'); // We should check for success, but we can't because of the stupid ajaxy way I did things. FIXME when the asset form is rewritten.
diff --git a/tests/functional/ConsumablesCest.php b/tests/functional/ConsumablesCest.php
index efa40c88a8..8d600634d7 100644
--- a/tests/functional/ConsumablesCest.php
+++ b/tests/functional/ConsumablesCest.php
@@ -16,7 +16,7 @@ class ConsumablesCest
{
$I->wantTo('ensure that the create consumables form loads without errors');
$I->lookForwardTo('seeing it load without errors');
- $I->amOnPage(route('create/consumable'));
+ $I->amOnPage(route('consumables.create'));
$I->dontSee('Create Consumable', '.page-header');
$I->see('Create Consumable', 'h1.pull-left');
}
@@ -24,7 +24,7 @@ class ConsumablesCest
public function failsEmptyValidation(FunctionalTester $I)
{
$I->wantTo("Test Validation Fails with blank elements");
- $I->amOnPage(route('create/consumable'));
+ $I->amOnPage(route('consumables.create'));
$I->click('Save');
$I->seeElement('.alert-danger');
$I->see('The name field is required.', '.alert-msg');
@@ -35,7 +35,7 @@ class ConsumablesCest
public function failsShortValidation(FunctionalTester $I)
{
$I->wantTo("Test Validation Fails with short name");
- $I->amOnPage(route('create/consumable'));
+ $I->amOnPage(route('consumables.create'));
$I->fillField('name', 't2');
$I->fillField('qty', '-15');
$I->fillField('min_amt', '-15');
@@ -62,7 +62,7 @@ class ConsumablesCest
'min_amt' => $consumable->min_amt,
];
$I->wantTo("Test Validation Succeeds");
- $I->amOnPage(route('create/consumable'));
+ $I->amOnPage(route('consumables.index'));
$I->submitForm('form#create-form', $values);
$I->seeRecord('consumables', $values);
$I->seeElement('.alert-success');
@@ -71,7 +71,7 @@ class ConsumablesCest
public function allowsDelete(FunctionalTester $I)
{
$I->wantTo('Ensure I can delete a consumable');
- $I->amOnPage(route('delete/consumable', $I->getConsumableId()));
+ $I->amOnPage(route('consumables.destroy', $I->getConsumableId()));
$I->seeElement('.alert-success');
}
}