Remove bogus integration tests that were passing (sometimes) by coincidence
An element of <button type="button" /> is not supposed to submit a form
This commit is contained in:
parent
d0cadf8a76
commit
f6dd24f7c5
|
@ -5,7 +5,6 @@
|
||||||
<input type="submit" id="input_submit_id" value="input_submit_value" />
|
<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="" />
|
<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="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>
|
<button type="image" id="button_image_id" value="button_image_value">button_image_text</button>
|
||||||
<% end %>
|
<% end %>
|
|
@ -5,7 +5,6 @@
|
||||||
<input type="submit" id="input_submit_id" value="input_submit_value">
|
<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="">
|
<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="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>
|
<button type="image" id="button_image_id" value="button_image_value">button_image_text</button>
|
||||||
<% end %>
|
<% end %>
|
|
@ -1,20 +1,6 @@
|
||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
class ButtonClickTest < ActionController::IntegrationTest
|
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" ...>
|
# <button type="submit" ...>
|
||||||
test "should click button with type submit by id" do
|
test "should click button with type submit by id" do
|
||||||
visit buttons_path
|
visit buttons_path
|
||||||
|
@ -76,5 +62,4 @@ class ButtonClickTest < ActionController::IntegrationTest
|
||||||
visit buttons_path
|
visit buttons_path
|
||||||
click_button "input_image_alt"
|
click_button "input_image_alt"
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue