Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add hostname condition tests #201

Closed
wants to merge 1 commit into from

2 participants

@abyx

I've been reading the code and couldn't find a test that validates the need for the addition of the "host_name" condition in the route() method. I added it to validate it does what I thought it does.
Hope you find it useful!

@rkh
Owner
rkh commented

Test for host name matching did indeed not check this option alias. Merged, thanks.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 5, 2011
  1. @abyx
This page is out of date. Refresh to see the latest.
Showing with 11 additions and 0 deletions.
  1. +11 −0 test/routing_test.rb
View
11 test/routing_test.rb
@@ -949,4 +949,15 @@ def authorize(username, password)
assert ok?
assert_equal 'bar in baseclass', body
end
+
+ it "adds hostname condition when it is in options" do
+ mock_app {
+ get '/foo', :host => 'host' do
+ 'foo'
+ end
+ }
+
+ get '/foo'
+ assert not_found?
+ end
end
Something went wrong with that request. Please try again.