Skip to content

Commit

Permalink
Fixed typo on tests fixed on #24
Browse files Browse the repository at this point in the history
  • Loading branch information
santigarcor committed Aug 29, 2016
1 parent 5fbcd63 commit 934f260
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions tests/Middleware/LaratrustAbilityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function testHandle_IsGuestWithNoAbility_ShouldAbort403()
$request->user()->shouldReceive('ability')->andReturn(false);
Config::shouldReceive('get')->once()->with('laratrust.middleware_handling', 'abort')
->andReturn('abort');
Config::shouldReceive('get')->once()->with('middleware_params', '403')
Config::shouldReceive('get')->once()->with('laratrust.middleware_params', '403')
->andReturn('403');

$middleware->handle($request, function () {}, null, null, true);
Expand Down Expand Up @@ -61,7 +61,7 @@ public function testHandle_IsGuestWithAbility_ShouldAbort403()
$request->user()->shouldReceive('ability')->andReturn(true);
Config::shouldReceive('get')->once()->with('laratrust.middleware_handling', 'abort')
->andReturn('abort');
Config::shouldReceive('get')->once()->with('middleware_params', '403')
Config::shouldReceive('get')->once()->with('laratrust.middleware_params', '403')
->andReturn('403');

$middleware->handle($request, function () {}, null, null);
Expand Down Expand Up @@ -95,7 +95,7 @@ public function testHandle_IsLoggedInWithNoAbility_ShouldAbort403()
$request->user()->shouldReceive('ability')->andReturn(false);
Config::shouldReceive('get')->once()->with('laratrust.middleware_handling', 'abort')
->andReturn('abort');
Config::shouldReceive('get')->once()->with('middleware_params', '403')
Config::shouldReceive('get')->once()->with('laratrust.middleware_params', '403')
->andReturn('403');

$middleware->handle($request, function () {}, null, null);
Expand Down
6 changes: 3 additions & 3 deletions tests/Middleware/LaratrustPermissionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function testHandle_IsGuestWithNoPermission_ShouldAbort403()
$request->user()->shouldReceive('can')->andReturn(false);
Config::shouldReceive('get')->once()->with('laratrust.middleware_handling', 'abort')
->andReturn('abort');
Config::shouldReceive('get')->once()->with('middleware_params', '403')
Config::shouldReceive('get')->once()->with('laratrust.middleware_params', '403')
->andReturn('403');

$middleware->handle($request, function () {}, null, null, true);
Expand Down Expand Up @@ -61,7 +61,7 @@ public function testHandle_IsGuestWithPermission_ShouldAbort403()
$request->user()->shouldReceive('can')->andReturn(true);
Config::shouldReceive('get')->once()->with('laratrust.middleware_handling', 'abort')
->andReturn('abort');
Config::shouldReceive('get')->once()->with('middleware_params', '403')
Config::shouldReceive('get')->once()->with('laratrust.middleware_params', '403')
->andReturn('403');

$middleware->handle($request, function () {}, null, null);
Expand Down Expand Up @@ -95,7 +95,7 @@ public function testHandle_IsLoggedInWithNoPermission_ShouldAbort403()
$request->user()->shouldReceive('can')->andReturn(false);
Config::shouldReceive('get')->once()->with('laratrust.middleware_handling', 'abort')
->andReturn('abort');
Config::shouldReceive('get')->once()->with('middleware_params', '403')
Config::shouldReceive('get')->once()->with('laratrust.middleware_params', '403')
->andReturn('403');

$middleware->handle($request, function () {}, null, null);
Expand Down
6 changes: 3 additions & 3 deletions tests/Middleware/LaratrustRoleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function testHandle_IsGuestWithMismatchingRole_ShouldAbort403()

Config::shouldReceive('get')->once()->with('laratrust.middleware_handling', 'abort')
->andReturn('abort');
Config::shouldReceive('get')->once()->with('middleware_params', '403')
Config::shouldReceive('get')->once()->with('laratrust.middleware_params', '403')
->andReturn('403');

$middleware->handle($request, function () {}, null, null, true);
Expand Down Expand Up @@ -62,7 +62,7 @@ public function testHandle_IsGuestWithMatchingRole_ShouldAbort403()
$request->user()->shouldReceive('hasRole')->andReturn(true);
Config::shouldReceive('get')->once()->with('laratrust.middleware_handling', 'abort')
->andReturn('abort');
Config::shouldReceive('get')->once()->with('middleware_params', '403')
Config::shouldReceive('get')->once()->with('laratrust.middleware_params', '403')
->andReturn('403');

$middleware->handle($request, function () {}, null, null);
Expand Down Expand Up @@ -96,7 +96,7 @@ public function testHandle_IsLoggedInWithMismatchRole_ShouldAbort403()
$request->user()->shouldReceive('hasRole')->andReturn(false);
Config::shouldReceive('get')->once()->with('laratrust.middleware_handling', 'abort')
->andReturn('abort');
Config::shouldReceive('get')->once()->with('middleware_params', '403')
Config::shouldReceive('get')->once()->with('laratrust.middleware_params', '403')
->andReturn('403');

$middleware->handle($request, function () {}, null, null);
Expand Down

0 comments on commit 934f260

Please sign in to comment.