Sha256: 3c724667fec8ebf3f3beef0efb32579874caec1c873a69b48b423b8bd97a65f9
Contents?: true
Size: 1.16 KB
Versions: 16
Compression:
Stored size: 1.16 KB
Contents
require 'test_helper' class FeedbackSubmissionTest < ActionDispatch::IntegrationTest fixtures :all describe "submitting feedback" do before do visit "/pointless_feedback" fill_in_fields click_on "Submit" end test "redirects to the root path" do assert_equal current_path, "/" end test "thanks message is displayed" do within('body') do assert_match 'Thanks for your feedback!', text end end end describe "submitting feedback with the honeypot field filled in" do before do visit "/pointless_feedback" fill_in_fields fill_in "message_contact_info", :with => "I'm a spam bot!" click_on "Submit" end test "redirects to the root path" do assert_equal current_path, "/" end test "thanks message is displayed" do within('body') do assert_match 'Thanks for your feedback!', text end end end def fill_in_fields fill_in "Name", :with => "Eli" fill_in "Email address", :with => "eli@example.com" select "Other", :from => "Topic" fill_in "Description", :with => "This site is awful" end end
Version data entries
16 entries across 16 versions & 1 rubygems