mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Merge pull request #611 from jonleighton/fix_current_url_spec
Use method="post".
This commit is contained in:
commit
58999f5f9f
2 changed files with 6 additions and 2 deletions
|
@ -40,6 +40,10 @@ class TestApp < Sinatra::Base
|
|||
"Current host is #{request.scheme}://#{request.host}:#{request.port}"
|
||||
end
|
||||
|
||||
post '/host' do
|
||||
"Current host is #{request.scheme}://#{request.host}:#{request.port}"
|
||||
end
|
||||
|
||||
get '/redirect/:times/times' do
|
||||
times = params[:times].to_i
|
||||
if times.zero?
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
<a href="<%= params[:absolute_host] %>/host">Absolute Host</a>
|
||||
</p>
|
||||
|
||||
<form action="/host">
|
||||
<form action="/host" method="post">
|
||||
<p><input type="submit" value="Relative Host"/></p>
|
||||
</form>
|
||||
|
||||
<form action="<%= params[:absolute_host] %>/host">
|
||||
<form action="<%= params[:absolute_host] %>/host" method="post">
|
||||
<p><input type="submit" value="Absolute Host"/></p>
|
||||
</form>
|
||||
|
|
Loading…
Add table
Reference in a new issue