Skip to content

Commit

Permalink
Fixing member.update method
Browse files Browse the repository at this point in the history
  • Loading branch information
superchilled committed Mar 5, 2024
1 parent 5433e9e commit 2a0b978
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/vonage/conversation/member.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def find_me(conversation_id:)
end

def update(conversation_id:, member_id:, **params)
request("/v1/conversations/#{conversation_id}/members/#{member_id}", params: params, type: Put)
request("/v1/conversations/#{conversation_id}/members/#{member_id}", params: params, type: Patch)
end
end
end
2 changes: 1 addition & 1 deletion test/vonage/conversation/member_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def test_find_me_method_without_conversation_id
end

def test_update_method
stub_request(:put, member_uri).with(body: { state: 'left' }).to_return(response)
stub_request(:patch, member_uri).with(body: { state: 'left' }).to_return(response)

assert_kind_of Vonage::Response, member.update(conversation_id: conversation_id, member_id: member_id, state: 'left')
end
Expand Down

0 comments on commit 2a0b978

Please sign in to comment.