spec/lib/frenchy/resource_spec.rb in frenchy-0.2.3 vs spec/lib/frenchy/resource_spec.rb in frenchy-0.2.4

- old
+ new

@@ -99,7 +99,18 @@ it "raises an exception if there are no endpoints" do expect do BinNoEndpoints.find_with_endpoint(:nonexist, myarg: "mydata") end.to raise_exception(Frenchy::Error) end + + it "includes the under_score model name in extras" do + response = double("Frenchy::Request", value: {}) + + expect(Frenchy::Request). + to receive(:new). + with("httpbin", "get", "/get", {"id" => 1}, {"model" => "bin_one_endpoint", "endpoint" => "default"}). + and_return(response) + + BinOneEndpoint.find_with_endpoint(:default, id: 1) + end end end \ No newline at end of file