spec/harmony/service/rpc_service_spec.rb in harmony-service-0.5.8 vs spec/harmony/service/rpc_service_spec.rb in harmony-service-0.6.0

- old
+ new

@@ -25,20 +25,20 @@ end context "action list" do context "list" do let(:request) { Harmony::Service::ActionList::ListRequest.new(harmony_user_email: "matt@futureworkshops.com", page: 0, per_page: 10) } - let(:response) { [Harmony::Service::ActionList::Item.new({id: 1, title: "Carrots"})]} + let(:response) { [{id: 1, title: "Carrots"}]} - it { expect(subject).to have_received(:send_response_json).with("[{\"^o\":\"Harmony::Service::ActionList::Item\",\"id\":1,\"title\":\"Carrots\"}]", "harmony.trello", "abc123") } + it { expect(subject).to have_received(:send_response_json).with("[{\":id\":1,\":title\":\"Carrots\"}]", "harmony.trello", "abc123") } it { expect(subject).to have_received(:ack!) } end context "item" do let(:request) { Harmony::Service::ActionList::ItemRequest.new(harmony_user_email: "matt@futureworkshops.com", id: 1) } - let(:response) { Harmony::Service::ActionList::Item.new({id: 1, title: "Carrots", subtitle: "Bag of Carrots", detail_html: "<html><body>Carrots</body></html>"})} + let(:response) { {id: 1, title: "Carrots", subtitle: "Bag of Carrots", detail_html: "<html><body>Carrots</body></html>"} } - it { expect(subject).to have_received(:send_response_json).with("{\"^o\":\"Harmony::Service::ActionList::Item\",\"id\":1,\"title\":\"Carrots\",\"subtitle\":\"Bag of Carrots\",\"detail_html\":\"<html><body>Carrots</body></html>\"}", "harmony.trello", "abc123") } + it { expect(subject).to have_received(:send_response_json).with("{\":id\":1,\":title\":\"Carrots\",\":subtitle\":\"Bag of Carrots\",\":detail_html\":\"<html><body>Carrots</body></html>\"}", "harmony.trello", "abc123") } it { expect(subject).to have_received(:ack!) } end context "action" do let(:request) { Harmony::Service::ActionList::ActionRequest.new(harmony_user_email: "matt@futureworkshops.com", id: 1, action: "Done") } \ No newline at end of file