File: test_select_noopts.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 (16 lines) | stat: -rw-r--r-- 384 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require "helper"

class SelectNoOptionsTest < Test::Unit::TestCase
  def setup
    @agent = Mechanize.new
    @page = @agent.get("http://localhost/form_select_noopts.html")
    @form = @page.forms.first
  end

  def test_select_default
    assert_not_nil(@form.field('list'))
    assert_nil(@form.list)
    page = @agent.submit(@form)
    assert_equal(0, page.links.length)
  end
end