Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
laravel-adminpanel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
laravel-adminpanel
Commits
08d5fe03
Commit
08d5fe03
authored
Jan 05, 2018
by
Viral Solani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Assertion in to delete test of User , Role and permission
parent
690656c6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
10 deletions
+11
-10
ManagePermissionsTest.php
tests/Feature/Backend/ManagePermissionsTest.php
+1
-4
ManageRolesTest.php
tests/Feature/Backend/ManageRolesTest.php
+5
-5
ManageUsersTest.php
tests/Feature/Backend/ManageUsersTest.php
+5
-1
No files found.
tests/Feature/Backend/ManagePermissionsTest.php
View file @
08d5fe03
...
...
@@ -110,12 +110,9 @@ class ManagePermissionsTest extends TestCase
$permission
=
create
(
Permission
::
class
);
/*$this->assertDatabaseHas(config('access.permissions_table'), [
['name' => $permission->name, 'id' => $permission->id]
]);*/
$this
->
actingAs
(
$this
->
admin
)
->
delete
(
route
(
'admin.access.permission.destroy'
,
$permission
))
->
assertStatus
(
302
)
->
assertSessionHas
([
'flash_success'
=>
trans
(
'alerts.backend.permissions.deleted'
)]);
/*$this->assertDatabaseMissing('permissions', [
...
...
tests/Feature/Backend/ManageRolesTest.php
View file @
08d5fe03
...
...
@@ -160,15 +160,15 @@ class ManageRolesTest extends TestCase
$role
=
create
(
Role
::
class
);
/*$this->assertDatabaseHas(config('access.roles_table'), [
['name' => $role->name, 'id' => $role->id]
]);*/
$this
->
actingAs
(
$this
->
admin
)
->
delete
(
route
(
'admin.access.role.destroy'
,
$role
))
->
assertStatus
(
302
)
->
assertSessionHas
([
'flash_success'
=>
trans
(
'alerts.backend.roles.deleted'
)]);
//$this->assertDatabaseMissing(config('access.roles_table'), ['name' => $role->name, 'id' => $role->id]);
/*$this->assertDatabaseMissing(config('access.roles_table'), [
'name' => $role->name,
'id' => $role->id
]);*/
Event
::
assertDispatched
(
RoleDeleted
::
class
);
}
...
...
tests/Feature/Backend/ManageUsersTest.php
View file @
08d5fe03
...
...
@@ -285,9 +285,13 @@ class ManageUsersTest extends TestCase
$this
->
actingAs
(
$this
->
admin
)
->
delete
(
route
(
'admin.access.user.destroy'
,
$user
))
->
assertStatus
(
302
)
->
assertSessionHas
([
'flash_success'
=>
trans
(
'alerts.backend.users.deleted'
)]);
$this
->
assertDatabaseMissing
(
config
(
'access.users_table'
),
[
'name'
=>
$user
->
first_name
,
'id'
=>
$user
->
id
]);
$this
->
assertDatabaseMissing
(
config
(
'access.users_table'
),
[
'name'
=>
$user
->
first_name
,
'id'
=>
$user
->
id
]);
Event
::
assertDispatched
(
UserDeleted
::
class
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment