Skip to content

Commit

Permalink
add a link to the rendered text and add a test for clicking it
Browse files Browse the repository at this point in the history
  • Loading branch information
adkron committed Jan 14, 2009
1 parent 9745673 commit 3902573
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Expand Up @@ -4,7 +4,7 @@ def form
end

def submit
render :text => "OK"
render :text => "OK <a href='/' id='link_id'>Test Link Text</a>"
end

def internal_redirect
Expand Down
6 changes: 6 additions & 0 deletions spec/integration/rails/test/integration/webrat_test.rb
Expand Up @@ -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

0 comments on commit 3902573

Please sign in to comment.