test/excon/addressable_test.rb in excon-addressable-0.1.0 vs test/excon/addressable_test.rb in excon-addressable-0.1.1

- old
+ new

@@ -1,5 +1,6 @@ +# frozen_string_literal: true require_relative '../test_helper' module Excon # AddressableTest # @@ -14,9 +15,15 @@ def test_expand_templated_uri conn = Excon.new('http://www.example.com/{uid}', expand: { uid: 'hello' }) assert_equal '/hello', conn.data[:path] assert_equal 200, conn.get.status + end + + def test_templated_uri_with_optional_query_parameters + conn = Excon.new('http://www.example.com/{?uid}') + + assert_equal '/', conn.data[:path] end def teardown Excon.stubs.clear end