Skip to content

Commit

Permalink
Remove bogus integration tests that were passing (sometimes) by coinc…
Browse files Browse the repository at this point in the history
…idence

An element of <button type="button" /> is not supposed to submit a form
  • Loading branch information
brynary committed Nov 14, 2009
1 parent d0cadf8 commit f6dd24f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
1 change: 0 additions & 1 deletion spec/integration/rails/app/views/buttons/show.html.erb
Expand Up @@ -5,7 +5,6 @@
<input type="submit" id="input_submit_id" value="input_submit_value" />
<input type="image" id="input_image_id" value="input_image_value" alt="input_image_alt" src="" />

<button type="button" id="button_button_id" value="button_button_value">button_button_text</button>
<button type="submit" id="button_submit_id" value="button_submit_value">button_submit_text</button>
<button type="image" id="button_image_id" value="button_image_value">button_image_text</button>
<% end %>
1 change: 0 additions & 1 deletion spec/integration/rails/app/views/webrat/buttons.html.erb
Expand Up @@ -5,7 +5,6 @@
<input type="submit" id="input_submit_id" value="input_submit_value">
<input type="image" id="input_image_id" value="input_image_value" alt="input_image_alt" src="">

<button type="button" id="button_button_id" value="button_button_value">button_button_text</button>
<button type="submit" id="button_submit_id" value="button_submit_value">button_submit_text</button>
<button type="image" id="button_image_id" value="button_image_value">button_image_text</button>
<% end %>
15 changes: 0 additions & 15 deletions spec/integration/rails/test/integration/button_click_test.rb
@@ -1,20 +1,6 @@
require 'test_helper'

class ButtonClickTest < ActionController::IntegrationTest
# <button type="button" ...>
test "should click button with type button by id" do
visit buttons_path
click_button "button_button_id"
end
test "should click button with type button by value" do
visit buttons_path
click_button "button_button_value"
end
test "should click button with type button by html" do
visit buttons_path
click_button "button_button_text"
end

# <button type="submit" ...>
test "should click button with type submit by id" do
visit buttons_path
Expand Down Expand Up @@ -76,5 +62,4 @@ class ButtonClickTest < ActionController::IntegrationTest
visit buttons_path
click_button "input_image_alt"
end

end

0 comments on commit f6dd24f

Please sign in to comment.