I am trying to test if external url active here:
class LinkSuccessTest < ActionDispatch::IntegrationTest
...
def test_external_url_success
@urls.each do |url|
get url
assert_response :success
end
end
end
but it wasn't working when there's a path parameter. For example,
$ rails console
> app.get "http://www.toms.com/"
=> 200
> app.get "http://www.toms.com/coffee"
=> 404
Here, how can I get the right response status?