Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests #22

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spec/conversations_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions spec/links_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/topics_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down