File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -235,4 +235,20 @@ def test_scopes_are_nondestructive
235235 assert_requested first_stub , times : 1
236236 assert_requested all_stub , times : 1
237237 end
238+
239+ def test_find_with_args
240+ first_stub = stub_request ( :get , "http://example.com/articles?filter[author.id]=foo" )
241+ . to_return ( headers : { content_type : "application/vnd.api+json" } , body : { data : [ ] } . to_json )
242+
243+ all_stub = stub_request ( :get , "http://example.com/articles" )
244+ . to_return ( headers : { content_type : "application/vnd.api+json" } , body : { data : [ ] } . to_json )
245+
246+ scope = Article . where ( )
247+
248+ scope . find ( "author.id" => "foo" )
249+ scope . all
250+
251+ assert_requested first_stub , times : 1
252+ assert_requested all_stub , times : 1
253+ end
238254end
You can’t perform that action at this time.
0 commit comments