Skip to content

Commit 33773f3

Browse files
committed
fixed hashkey order problem; added missing dependencies
1 parent 909070d commit 33773f3

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

dist.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,6 @@ SQL::Translator = 0.11006
4545
Catalyst::Plugin::ConfigLoader = 0
4646
Catalyst::Plugin::Session = 0
4747
Catalyst::Plugin::Session::State::Cookie = 0
48+
Catalyst::Plugin::Authentication = 0
4849

4950
[UploadToCPAN]

t/unit/700-client.t

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ sub for_session { }
1919

2020
package Test::Mock::Realm;
2121
use Moose;
22+
use URI;
2223
our $user;
2324
our $store = Test::Mock::Store->new;
2425
our @called;
@@ -61,7 +62,19 @@ my $mock = mock_context('ClientApp');
6162

6263
my $extend_perms_uri = $cred->extend_permissions($callback_uri);
6364

64-
is( $c->res->redirect, $extend_perms_uri );
65+
# We make the stringy redirect into a URL object to compare
66+
# since the query part can be ordered variously (did this to
67+
# solve a failure case when the query keywords were ordered
68+
# differently but in real life they are equal by the definitation of
69+
# URL equality.
70+
71+
my $redirect_url = URI->new($c->res->redirect);
72+
is $redirect_url->scheme, $extend_perms_uri->scheme;
73+
is $redirect_url->path, $extend_perms_uri->path;
74+
is $redirect_url->authority, $extend_perms_uri->authority;
75+
is_deeply(
76+
+{$redirect_url->query_form},
77+
+{$extend_perms_uri->query_form} );
6578
}
6679

6780
my $j = JSON::Any->new;

0 commit comments

Comments
 (0)