We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 462e59e commit 9f6a391Copy full SHA for 9f6a391
1 file changed
test/unit/query_builder_test.rb
@@ -122,6 +122,16 @@ def test_can_specify_additional_params
122
Article.with_params(sort: "foo").to_a
123
end
124
125
+ def test_can_merge_nested_additional_params
126
+ stub_request(:get, "http://example.com/articles")
127
+ .with(query: {top: {foos: 1, bars: 2}})
128
+ .to_return(headers: {content_type: "application/vnd.api+json"}, body: {
129
+ data: []
130
+ }.to_json)
131
+
132
+ Article.with_params(top: {foos: 1}).with_params(top: {bars: 2}).to_a
133
+ end
134
135
def test_can_select_fields
136
stub_request(:get, "http://example.com/articles")
137
.with(query: {fields: {articles: 'title,body'}})
0 commit comments