add a link to the rendered text and add a test for clicking it
This commit is contained in:
parent
9745673f1c
commit
3902573d3e
|
@ -4,7 +4,7 @@ class WebratController < ApplicationController
|
|||
end
|
||||
|
||||
def submit
|
||||
render :text => "OK"
|
||||
render :text => "OK <a href='/' id='link_id'>Test Link Text</a>"
|
||||
end
|
||||
|
||||
def internal_redirect
|
||||
|
|
|
@ -23,4 +23,10 @@ class WebratTest < ActionController::IntegrationTest
|
|||
visit external_redirect_path
|
||||
assert response.redirect?
|
||||
end
|
||||
|
||||
test "should click link by text" do
|
||||
visit internal_redirect_path
|
||||
click_link "Test Link Text"
|
||||
assert_contain("Webrat Form")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue