mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Routing: improve static segment test coverage. #7117 [Kevin Clark]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6979 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
a308ff0cdd
commit
160af194e4
1 changed files with 6 additions and 6 deletions
|
@ -599,18 +599,18 @@ class SegmentTest < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
class StaticSegmentTest < Test::Unit::TestCase
|
class StaticSegmentTest < Test::Unit::TestCase
|
||||||
|
|
||||||
def test_interpolation_chunk_should_respect_raw
|
def test_interpolation_chunk_should_respect_raw
|
||||||
s = ROUTING::StaticSegment.new
|
s = ROUTING::StaticSegment.new
|
||||||
s.value = 'Hello/World'
|
s.value = 'Hello World'
|
||||||
assert ! s.raw?
|
assert ! s.raw?
|
||||||
assert_equal 'Hello/World', CGI.unescape(s.interpolation_chunk)
|
assert_equal 'Hello%20World', s.interpolation_chunk
|
||||||
|
|
||||||
s.raw = true
|
s.raw = true
|
||||||
assert s.raw?
|
assert s.raw?
|
||||||
assert_equal 'Hello/World', s.interpolation_chunk
|
assert_equal 'Hello World', s.interpolation_chunk
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_regexp_chunk_should_escape_specials
|
def test_regexp_chunk_should_escape_specials
|
||||||
s = ROUTING::StaticSegment.new
|
s = ROUTING::StaticSegment.new
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue