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
190af1e8
Commit
190af1e8
authored
Jan 02, 2018
by
Viral Solani
Committed by
StyleCI Bot
Jan 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply fixes from StyleCI
parent
cd88c0ac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
RoleRepository.php
app/Repositories/Backend/Access/Role/RoleRepository.php
+1
-0
ManageRolesTest.php
tests/Feature/Backend/ManageRolesTest.php
+9
-9
No files found.
app/Repositories/Backend/Access/Role/RoleRepository.php
View file @
190af1e8
...
...
@@ -114,6 +114,7 @@ class RoleRepository extends BaseRepository
return
true
;
}
throw
new
GeneralException
(
trans
(
'exceptions.backend.access.roles.create_error'
));
});
}
...
...
tests/Feature/Backend/ManageRolesTest.php
View file @
190af1e8
...
...
@@ -2,14 +2,14 @@
namespace
Tests\Feature\Backend
;
use
Tests\TestCase
;
use
App\Models\Access\Role\Role
;
use
App\Exceptions\GeneralException
;
use
Illuminate\Support\Facades\Event
;
use
App\Models\Access\Permission\Permission
;
use
App\Events\Backend\Access\Role\RoleCreated
;
use
App\Events\Backend\Access\Role\RoleDeleted
;
use
App\Events\Backend\Access\Role\RoleUpdated
;
use
App\Exceptions\GeneralException
;
use
App\Models\Access\Permission\Permission
;
use
App\Models\Access\Role\Role
;
use
Illuminate\Support\Facades\Event
;
use
Tests\TestCase
;
class
ManageRolesTest
extends
TestCase
{
...
...
@@ -60,7 +60,7 @@ class ManageRolesTest extends TestCase
$this->expectException(GeneralException::class);
}*/
/** @test */
/** @test */
public
function
a_user_can_create_new_role
()
{
// Make sure our events are fired
...
...
@@ -75,7 +75,7 @@ class ManageRolesTest extends TestCase
->
assertSessionHas
([
'flash_success'
=>
trans
(
'alerts.backend.roles.created'
)]);
$this
->
assertDatabaseHas
(
config
(
'access.roles_table'
),
[
'name'
=>
$role
[
'name'
]
'name'
=>
$role
[
'name'
]
,
]);
Event
::
assertDispatched
(
RoleCreated
::
class
);
...
...
@@ -99,7 +99,7 @@ class ManageRolesTest extends TestCase
->
assertSessionHas
([
'flash_success'
=>
trans
(
'alerts.backend.roles.created'
)]);
$this
->
assertDatabaseHas
(
config
(
'access.roles_table'
),
[
'name'
=>
$role
[
'name'
]
'name'
=>
$role
[
'name'
]
,
]);
$this
->
assertDatabaseHas
(
config
(
'access.permissions_table'
),
[
'name'
=>
$permission
->
name
]);
...
...
@@ -144,7 +144,7 @@ class ManageRolesTest extends TestCase
->
assertSessionHas
([
'flash_success'
=>
trans
(
'alerts.backend.roles.updated'
)]);
$this
->
assertDatabaseHas
(
config
(
'access.roles_table'
),
[
'name'
=>
$data
[
'name'
]
'name'
=>
$data
[
'name'
]
,
]);
$this
->
assertDatabaseHas
(
config
(
'access.permissions_table'
),
[
'name'
=>
$permission
->
name
]);
...
...
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