Skip to content

Commit

Permalink
Add tests for #889
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary Scott committed May 9, 2016
1 parent b1722e8 commit faab2bc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/helpers_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1825,6 +1825,17 @@ def obj.is_a?(thing) 60.is_a?(thing) end
get '/'
assert_equal 'http://example.org/', body
end

it 'is case-insensitive' do
mock_app { get('/:foo') { uri params[:foo] }}
assert_equal get('HtTP://google.com').body, get('http://google.com').body
end

it 'generates relative link for invalid path' do
mock_app { get('/') { uri 'htt^p://google.com' }}
get '/'
assert_equal 'http://example.org/htt^p://google.com', body
end
end

describe 'logger' do
Expand Down

0 comments on commit faab2bc

Please sign in to comment.