Skip to content

Commit

Permalink
Add more test cases to earn coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
knu committed Jan 8, 2011
1 parent b31a9be commit 3158228
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/test_webrobots.rb
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,12 @@ class TestWebRobots < Test::Unit::TestCase
should "properly restrict access" do
assert @robots_good.allowed?('http://www.example.org/index.html')
assert !@robots_good.allowed?('http://www.example.org/2heavy/index.php')
assert @robots_good.allowed?('http://www.example.org/2HEAVY/index.php')
assert !@robots_good.allowed?(URI('http://www.example.org/2heavy/index.php'))
assert @robots_good.allowed?('http://www.example.org/2heavy/index.html')
assert @robots_good.allowed?('http://WWW.Example.Org/2heavy/index.html')
assert !@robots_good.allowed?('http://www.example.org/2heavy/index.htm')
assert !@robots_good.allowed?('http://WWW.Example.Org/2heavy/index.htm')

assert !@robots_evil.allowed?('http://www.example.org/index.html')
assert !@robots_evil.allowed?('http://www.example.org/2heavy/index.php')
Expand Down

0 comments on commit 3158228

Please sign in to comment.