Skip to content

Commit

Permalink
Add tests for the Util#parse_uri method.
Browse files Browse the repository at this point in the history
  • Loading branch information
hainesr committed Jul 2, 2014
1 parent 64a5346 commit 76ba4ec
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/tc_util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,13 @@ def test_parse_time
assert_nil ROBundle::Util.parse_time(nil)
end

def test_parse_uri
str = "http://example.com/test.txt"
uri = URI.parse(str)

assert_nil ROBundle::Util.parse_uri(nil)
assert_same uri, ROBundle::Util.parse_uri(uri)
assert_equal uri, ROBundle::Util.parse_uri(str)
end

end

0 comments on commit 76ba4ec

Please sign in to comment.