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
|
end
|
||||||
|
|
||||||
def submit
|
def submit
|
||||||
render :text => "OK"
|
render :text => "OK <a href='/' id='link_id'>Test Link Text</a>"
|
||||||
end
|
end
|
||||||
|
|
||||||
def internal_redirect
|
def internal_redirect
|
||||||
|
@ -23,4 +23,10 @@ class WebratTest < ActionController::IntegrationTest
|
|||||||
visit external_redirect_path
|
visit external_redirect_path
|
||||||
assert response.redirect?
|
assert response.redirect?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test "should click link by text" do
|
||||||
|
visit internal_redirect_path
|
||||||
|
click_link "Test Link Text"
|
||||||
|
assert_contain("Webrat Form")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user