spec/models/rapi_spec.rb in f5-icontrol-0.3.3 vs spec/models/rapi_spec.rb in f5-icontrol-0.3.5

- old
+ new

@@ -38,9 +38,18 @@ subject.foo_bar.get_collection expect(WebMock).to have_requested(:get, "#{baseurl}/foo-bar/") end + it "preserves underscores in pool names" do + stub_request(:get, "#{baseurl}/pool/foo_bar"). + to_return(body: pool_collection) + + subject.pool.load('foo_bar') + + expect(WebMock).to have_requested(:get, "#{baseurl}/pool/foo_bar") + end + it "understands `each` implicitly calls `get_collection`" do stub_request(:get, "#{baseurl}/foo/bar/"). to_return(body: pool_collection) bars = subject.foo.bar.each