Skip to content

Commit c700ff2

Browse files
committed
CI uses Capybara.app_host instead of server
1 parent d995445 commit c700ff2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

features/page/session/password_recover.rb

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ class PasswordRecover
88

99
class << self
1010
def path_for_token token
11-
host = Capybara.current_session.server.host
12-
port = Capybara.current_session.server.port
11+
current_host =
12+
Capybara.app_host ||
13+
"http://#{ Capybara.current_session.server.host }:#{ Capybara.current_session.server.port }"
1314

14-
"/users/password/edit?config=default&redirect_url=http%3A%2F%2F#{ host }%3A#{ port }%2Fecho.json&reset_password_token=#{ token }"
15+
"/users/password/edit?config=default&#{ URI.encode_www_form redirect_url: current_host }%2Fecho.json&reset_password_token=#{ token }"
1516
end
1617
end
1718

0 commit comments

Comments
 (0)