Fixed Users functional test

This commit is contained in:
snipe 2016-12-15 21:17:11 -08:00
parent 84e1b531fd
commit c7e98366be

View file

@ -16,7 +16,7 @@ class UsersCest
{
$I->wantTo('ensure that the create users form loads without errors');
$I->lookForwardTo('seeing it load without errors');
$I->amOnPage(route('create/user'));
$I->amOnPage(route('users.create'));
$I->dontSee('Create User', '.page-header');
$I->see('Create User', 'h1.pull-left');
}
@ -24,7 +24,7 @@ class UsersCest
public function failsEmptyValidation(FunctionalTester $I)
{
$I->wantTo("Test Validation Fails with blank elements");
$I->amOnPage(route('create/user'));
$I->amOnPage(route('users.create'));
$I->click('Save');
$I->seeElement('.alert-danger');
$I->see('The first name field is required.', '.alert-msg');
@ -35,7 +35,7 @@ class UsersCest
public function failsShortValidation(FunctionalTester $I)
{
$I->wantTo("Test Validation Fails with short name");
$I->amOnPage(route('create/user'));
$I->amOnPage(route('users.create'));
$I->fillField('first_name', 't2');
$I->fillField('last_name', 't2');
$I->fillField('username', 'a'); // Must be 2 chars
@ -82,7 +82,7 @@ class UsersCest
'activated' => true,
'notes' => $user->notes
];
$I->amOnPage(route('create/user'));
$I->amOnPage(route('users.create'));
$I->wantTo("Test Validation Succeeds");
$I->submitForm('form#userForm', $submitValues);
$I->seeRecord('users', $storedValues);
@ -92,7 +92,7 @@ class UsersCest
public function allowsDelete(FunctionalTester $I)
{
$I->wantTo('Ensure I can delete a user');
$I->amOnPage(route('delete/user', User::doesntHave('assets')
$I->amOnPage(route('users.destroy', User::doesntHave('assets')
->doesntHave('accessories')
->doesntHave('consumables')
->doesntHave('licenses')