spec/livefyre/domain_spec.rb in livefyre-0.0.1 vs spec/livefyre/domain_spec.rb in livefyre-0.1.0
- old
+ new
@@ -138,21 +138,21 @@
end
describe "#add_owner" do
context "on success" do
before do
- client = double( :put => double(:success? => true), :system_token => "x", :host => "some_host", :key => "some_key" )
+ client = double( :post => double(:success? => true), :system_token => "x", :host => "some_host", :key => "some_key" )
subject.stub(:client).and_return(client)
end
it "should return true" do
subject.add_owner("some ID").should be true
end
end
context "on failure" do
before do
- client = double( :put => double(:success? => false, :body => ""), :system_token => "x", :host => "some_host", :key => "some_key" )
+ client = double( :post => double(:success? => false, :body => ""), :system_token => "x", :host => "some_host", :key => "some_key" )
subject.stub(:client).and_return(client)
end
it "should raise an exception" do
expect { subject.add_owner("some user ID") }.to raise_error(Livefyre::APIException)
\ No newline at end of file