File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
lib/google/api_client/discovery Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ def http_method
108
108
# @return [Addressable::Template] The URI template.
109
109
def uri_template
110
110
return @uri_template ||= Addressable ::Template . new (
111
- self . method_base . join ( Addressable ::URI . parse ( @discovery_document [ 'path' ] ) )
111
+ self . method_base . join ( Addressable ::URI . parse ( "./" + @discovery_document [ 'path' ] ) )
112
112
)
113
113
end
114
114
Original file line number Diff line number Diff line change 688
688
it 'should correctly determine the service root_uri' do
689
689
expect ( @pubsub . root_uri . to_s ) . to eq ( 'https://pubsub.googleapis.com/' )
690
690
end
691
+
692
+ it 'should discover correct method URIs' do
693
+ list = CLIENT . discovered_method (
694
+ "pubsub.projects.topics.list" , "pubsub" , "v1beta2"
695
+ )
696
+ expect ( list . uri_template . pattern ) . to eq (
697
+ "https://pubsub.googleapis.com/v1beta2/{+project}/topics"
698
+ )
699
+
700
+ publish = CLIENT . discovered_method (
701
+ "pubsub.projects.topics.publish" , "pubsub" , "v1beta2"
702
+ )
703
+ expect ( publish . uri_template . pattern ) . to eq (
704
+ "https://pubsub.googleapis.com/v1beta2/{+topic}:publish"
705
+ )
706
+ end
691
707
end
692
708
end
You can’t perform that action at this time.
0 commit comments