File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
t/server/controller/login Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,14 @@ with qw(
2020my $openid_server = Test::OpenID::Server-> new;
2121my $url = $openid_server -> started_ok(' start server' );
2222
23+ sub fix_localhost_uri {
24+ my $uri = shift ;
25+
26+ # The dev vm make it localhost, but on travis it becomes `.localdomain`.
27+ $uri =~ s { ^(\w +://localhost)\. localdomain([:/])} { $1$2 } ;
28+ $uri ;
29+ }
30+
2331test authorization => sub {
2432 my $self = shift ;
2533
@@ -34,7 +42,7 @@ test authorization => sub {
3442 ok( $self -> request( GET ' /login/openid?' . $uri_params -> query ),
3543 ' login with test URL' );
3644
37- like $self -> redirect_uri,
45+ like fix_localhost_uri( $self -> redirect_uri ) ,
3846 qr {\Q $url \E /openid.server} , ' get correct OpenID server url' ;
3947
4048 $self -> follow_redirect;
You can’t perform that action at this time.
0 commit comments