Sha256: e8dfe5f0fd3963c458391fcde6dd2a80543661dee3fe2d50ffc79a1f45b617bf
Contents?: true
Size: 733 Bytes
Versions: 25
Compression:
Stored size: 733 Bytes
Contents
require 'mechanize/test_case' class TestMechanizeFormCheckBox < Mechanize::TestCase def setup super @page = @mech.get('http://localhost/tc_checkboxes.html') end def test_check form = @page.forms.first form.checkbox_with(:name => 'green').check assert(form.checkbox_with(:name => 'green').checked) %w{ red blue yellow brown }.each do |color| assert_equal(false, form.checkbox_with(:name => color).checked) end end def test_uncheck form = @page.forms.first checkbox = form.checkbox_with(:name => 'green') checkbox.check assert form.checkbox_with(:name => 'green').checked checkbox.uncheck assert !form.checkbox_with(:name => 'green').checked end end
Version data entries
25 entries across 25 versions & 4 rubygems