test/aitch/uri_test.rb in aitch-1.0.2 vs test/aitch/uri_test.rb in aitch-1.1.0
- old
+ new
@@ -1,6 +1,7 @@
# frozen_string_literal: true
+
require "test_helper"
class UriTest < Minitest::Test
test "returns default path" do
assert_equal "/", Aitch::URI.new("http://example.org").path
@@ -25,10 +26,10 @@
test "merges data into query string" do
assert_equal "?a=1&b=2&c=3", Aitch::URI.new("http://example.org/?a=1&b=2", c: 3).query
end
test "ignores data when request has body" do
- assert_equal nil, Aitch::URI.new("http://example.org/", {c: 3}, true).query
+ assert_nil Aitch::URI.new("http://example.org/", {c: 3}, true).query
end
test "returns request uri" do
uri = Aitch::URI.new("http://example.org/some/path?a=1&b=2#hello", c: 3)
assert_equal "/some/path?a=1&b=2&c=3#hello", uri.request_uri