File: test_select_all.rb

package info (click to toggle)
libwww-mechanize-ruby 1.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 956 kB
  • ctags: 883
  • sloc: ruby: 6,621; makefile: 4
file content (15 lines) | stat: -rw-r--r-- 404 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require "helper"
class SelectAllTest < Test::Unit::TestCase
  def setup
    @agent = Mechanize.new
    @page = @agent.get("http://localhost/form_select_all.html")
    @form = @page.forms.first
  end

  def test_select_default
    assert_equal("6", @form.list)
    page = @agent.submit(@form)
    assert_equal(1, page.links.length)
    assert_equal(1, page.links_with(:text => 'list:6').length)
  end
end