spec/bamboo-client/remote_spec.rb in bamboo-client-0.0.2 vs spec/bamboo-client/remote_spec.rb in bamboo-client-0.0.3

- old
+ new

@@ -4,12 +4,17 @@ module Client describe Remote do let(:url) { "http://bamboo.example.com" } let(:http) { mock(Http::Xml) } let(:client) { Remote.new(http) } - let(:document) { mock(Http::Xml::Doc) } + let(:document) { + m = mock(Http::Xml::Doc) + m.stub(:css).with("errors error").and_return [] + m + } + context "authorization" do it "logs in" do document.should_receive(:text_for).with("response auth").and_return "token" http.should_receive(:post).with( @@ -27,10 +32,10 @@ end it "logs out" do http.should_receive(:post).with( "/api/rest/logout.action", - :token => "foo" + :auth => "foo" ) client.instance_variable_set "@token", "foo" client.logout client.token.should be_nil