Simplify URL validation in related content
We were using `Setting["url"]` to verify the content belonged to the application URL, but we can use `root_url` instead. Note that means we need to include the port when filling in forms in the tests, since in tests URL helpers like `polymorphic_url` don't include the port, but a port is automatically added when actually making the request.
This commit is contained in:
@@ -19,7 +19,11 @@ module CommonActions
|
||||
include Verifications
|
||||
|
||||
def app_host
|
||||
"#{Capybara.app_host}:#{Capybara::Server.ports.values.last}"
|
||||
"#{Capybara.app_host}:#{app_port}"
|
||||
end
|
||||
|
||||
def app_port
|
||||
Capybara::Server.ports.values.last
|
||||
end
|
||||
|
||||
def fill_in_signup_form(email = "manuela@consul.dev", password = "judgementday")
|
||||
|
||||
Reference in New Issue
Block a user