File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -45,5 +45,6 @@ SQL::Translator = 0.11006
4545Catalyst::Plugin::ConfigLoader = 0
4646Catalyst::Plugin::Session = 0
4747Catalyst::Plugin::Session::State::Cookie = 0
48+ Catalyst::Plugin::Authentication = 0
4849
4950[UploadToCPAN]
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ sub for_session { }
1919
2020package Test::Mock::Realm ;
2121use Moose;
22+ use URI;
2223our $user ;
2324our $store = Test::Mock::Store-> new;
2425our @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
6780my $j = JSON::Any-> new;
You can’t perform that action at this time.
0 commit comments