-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9bc3178
commit ed0e186
Showing
7 changed files
with
44 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,6 @@ | |
|
||
/** | ||
* Class SsoControllerTest | ||
* | ||
* @package Spinen\Discourse\Controllers | ||
*/ | ||
class SsoControllerTest extends TestCase | ||
{ | ||
|
@@ -89,7 +87,7 @@ public function it_aborts_if_the_payload_is_invalid() | |
->with('services.discourse') | ||
->andReturn([ | ||
'secret' => 'secret', | ||
'user' => [ | ||
'user' => [ | ||
'access' => null, | ||
], | ||
]); | ||
|
@@ -151,7 +149,6 @@ public function it_is_backwards_compatible_with_config_that_does_not_have_access | |
$controller = new SsoController($this->config_mock, $this->sso_helper_mock); | ||
|
||
$controller->login($this->request_mock); | ||
|
||
} | ||
|
||
/** | ||
|
@@ -167,7 +164,7 @@ public function it_aborts_if_the_user_does_not_have_access() | |
->with('services.discourse') | ||
->andReturn([ | ||
'secret' => 'secret', | ||
'user' => [ | ||
'user' => [ | ||
'access' => 'forum_access', | ||
], | ||
]); | ||
|
@@ -195,14 +192,14 @@ public function it_builds_the_correct_payload() | |
->andReturn([ | ||
'secret' => 'secret', | ||
// Expect the '/' on the end to not double up | ||
'url' => 'http://discourse/', | ||
'user' => [ | ||
'external_id' => 'id', | ||
'email' => 'email', | ||
'url' => 'http://discourse/', | ||
'user' => [ | ||
'external_id' => 'id', | ||
'email' => 'email', | ||
// Expect this null_value to not be passed on | ||
'null_value' => null, | ||
'false_value' => false, | ||
'true_value' => true, | ||
'null_value' => null, | ||
'false_value' => false, | ||
'true_value' => true, | ||
'string_value' => 'string', | ||
], | ||
]); | ||
|
@@ -243,8 +240,8 @@ public function it_builds_the_correct_payload() | |
1, | ||
'[email protected]', | ||
[ | ||
'false_value' => 'false', | ||
'true_value' => 'true', | ||
'false_value' => 'false', | ||
'true_value' => 'true', | ||
'string_value' => 'string_property', | ||
], | ||
]) | ||
|
@@ -258,7 +255,7 @@ public function it_builds_the_correct_payload() | |
|
||
function abort($code) | ||
{ | ||
throw new Exception("Some error message", $code); | ||
throw new Exception('Some error message', $code); | ||
} | ||
|
||
function redirect($path) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.