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(
20
20
my $openid_server = Test::OpenID::Server-> new;
21
21
my $url = $openid_server -> started_ok(' start server' );
22
22
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
+
23
31
test authorization => sub {
24
32
my $self = shift ;
25
33
@@ -34,7 +42,7 @@ test authorization => sub {
34
42
ok( $self -> request( GET ' /login/openid?' . $uri_params -> query ),
35
43
' login with test URL' );
36
44
37
- like $self -> redirect_uri,
45
+ like fix_localhost_uri( $self -> redirect_uri ) ,
38
46
qr {\Q $url \E /openid.server} , ' get correct OpenID server url' ;
39
47
40
48
$self -> follow_redirect;
You can’t perform that action at this time.
0 commit comments