spec/harmony/service/rpc_service_spec.rb in harmony-service-0.4.4 vs spec/harmony/service/rpc_service_spec.rb in harmony-service-0.5.0
- old
+ new
@@ -84,9 +84,16 @@
let(:request) { Harmony::Service::AttributeNamesRequest.new }
let(:response) { Harmony::Service::AttributeNamesResponse.new}
it { expect(subject).to have_received(:send_response_json).with("{\"^o\":\"Harmony::Service::AttributeNamesResponse\",\"options\":{}}", "harmony.trello", "abc123") }
it { expect(subject).to have_received(:ack!) }
end
+
+ context "oauth_token" do
+ let(:request) { Harmony::Service::OauthTokenRequest.new }
+ let(:response) { Harmony::Service::OauthTokenResponse.new}
+ it { expect(subject).to have_received(:send_response_json).with("{\"^o\":\"Harmony::Service::OauthTokenResponse\"}", "harmony.trello", "abc123") }
+ it { expect(subject).to have_received(:ack!) }
+ end
context "exception" do
let(:handler) do
handler = double("Object")
expect(handler).to receive(:work_with_request).and_raise("Could not complete.")
\ No newline at end of file