From 45e8dcc32ae400e5599bf922ae751552f4be653f Mon Sep 17 00:00:00 2001 From: Anthony Panozzo Date: Fri, 30 Sep 2022 16:48:10 -0400 Subject: [PATCH 1/5] Fix syntax error --- spec/links_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/links_spec.rb b/spec/links_spec.rb index f72e015..c484ef9 100644 --- a/spec/links_spec.rb +++ b/spec/links_spec.rb @@ -183,7 +183,7 @@ } } end - let(:create_link_response) { + let(:create_link_response) do %Q{ { "_links"=>{"self"=>"https://lending-home.api.frontapp.com/links/top_3ij8h"}, From d9d091a1b9247f74b286e23c8b601120159e7d35 Mon Sep 17 00:00:00 2001 From: Anthony Panozzo Date: Fri, 30 Sep 2022 16:50:29 -0400 Subject: [PATCH 2/5] Change test to match test name and pass --- spec/conversations_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/conversations_spec.rb b/spec/conversations_spec.rb index aca7c15..21a72d6 100644 --- a/spec/conversations_spec.rb +++ b/spec/conversations_spec.rb @@ -616,7 +616,7 @@ stub_request(:delete, "#{base_url}/conversations/#{conversation_id}/links"). with( headers: headers). to_return(status: 204, body: nil) - frontapp.delete_tag!(conversation_id, data) + frontapp.remove_conversation_links!(conversation_id, data) end it "can remove conversation followers by id" do From 8df71c10622e8526b392d5eaf0e627ca631f09ad Mon Sep 17 00:00:00 2001 From: Anthony Panozzo Date: Fri, 30 Sep 2022 16:56:37 -0400 Subject: [PATCH 3/5] Fix test --- spec/links_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/links_spec.rb b/spec/links_spec.rb index c484ef9..8dc605d 100644 --- a/spec/links_spec.rb +++ b/spec/links_spec.rb @@ -213,7 +213,7 @@ it "can get a link" do stub_request(:get, "#{base_url}/links/#{link_id}"). with( headers: headers). - to_return(status: 200, body: get_link_response) + to_return(status: 200, body: get_link_response.to_json) frontapp.get_link(link_id) end From df7813d7975dbe26b2fcda0c99ea3659ffaa242b Mon Sep 17 00:00:00 2001 From: Anthony Panozzo Date: Fri, 30 Sep 2022 16:58:50 -0400 Subject: [PATCH 4/5] Finish create link test --- spec/links_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/links_spec.rb b/spec/links_spec.rb index 8dc605d..2f87e34 100644 --- a/spec/links_spec.rb +++ b/spec/links_spec.rb @@ -225,7 +225,8 @@ stub_request(:post, "#{base_url}/links"). with( body: data.to_json, headers: headers). - to_return(status: 200, body: ) + to_return(status: 200, body: '{}') + frontapp.create_link!(data) end it "can update a link name" do From 2b706c03b9cfa04ae894828cd62c6c3fdffb366d Mon Sep 17 00:00:00 2001 From: Anthony Panozzo Date: Fri, 30 Sep 2022 17:03:44 -0400 Subject: [PATCH 5/5] Fix topics test --- spec/topics_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/topics_spec.rb b/spec/topics_spec.rb index 5a0f2f1..4f359b3 100644 --- a/spec/topics_spec.rb +++ b/spec/topics_spec.rb @@ -138,7 +138,7 @@ } it "can get all topic conversations" do - stub_request(:get, "#{base_url}/topics/#{topic_id}/conversations"). + stub_request(:get, "#{base_url}/links/#{topic_id}/conversations"). with( headers: headers). to_return(status: 200, body: topic_conversations_response) frontapp.get_topic_conversations(topic_id)