chore: Update dependencies to the latest versions (#5033)
This commit is contained in:
parent
ea1a27c7d4
commit
4187428729
122 changed files with 546 additions and 526 deletions
|
@ -40,7 +40,7 @@ RSpec.describe '/api/v1/widget/config', type: :request do
|
|||
params: params,
|
||||
headers: { 'X-Auth-Token' => token },
|
||||
as: :json
|
||||
end.to change(Contact, :count).by(0)
|
||||
end.not_to change(Contact, :count)
|
||||
|
||||
expect(response).to have_http_status(:success)
|
||||
response_data = JSON.parse(response.body)
|
||||
|
|
|
@ -103,8 +103,8 @@ RSpec.describe '/api/v1/widget/contacts', type: :request do
|
|||
|
||||
body = JSON.parse(response.body)
|
||||
expect(body['id']).not_to eq(contact.id)
|
||||
expect(body['widget_auth_token']).not_to eq(nil)
|
||||
expect(Contact.find(body['id']).contact_inboxes.first.hmac_verified?).to eq(true)
|
||||
expect(body['widget_auth_token']).not_to be_nil
|
||||
expect(Contact.find(body['id']).contact_inboxes.first.hmac_verified?).to be(true)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ RSpec.describe '/api/v1/widget/conversations/toggle_typing', type: :request do
|
|||
|
||||
expect(response).to have_http_status(:success)
|
||||
json_response = JSON.parse(response.body)
|
||||
expect(json_response['id']).not_to eq nil
|
||||
expect(json_response['id']).not_to be_nil
|
||||
expect(json_response['contact']['email']).to eq 'contact-email@chatwoot.com'
|
||||
expect(json_response['contact']['phone_number']).to eq '+919745313456'
|
||||
expect(json_response['contact']['name']).to eq 'contact-name'
|
||||
|
@ -95,7 +95,7 @@ RSpec.describe '/api/v1/widget/conversations/toggle_typing', type: :request do
|
|||
|
||||
expect(response).to have_http_status(:success)
|
||||
json_response = JSON.parse(response.body)
|
||||
expect(json_response['id']).not_to eq nil
|
||||
expect(json_response['id']).not_to be_nil
|
||||
expect(json_response['contact']['email']).to eq existing_contact.email
|
||||
expect(json_response['contact']['name']).not_to eq 'contact-name'
|
||||
expect(json_response['contact']['phone_number']).to eq '+919745313456'
|
||||
|
@ -124,7 +124,7 @@ RSpec.describe '/api/v1/widget/conversations/toggle_typing', type: :request do
|
|||
context 'with a conversation' do
|
||||
it 'returns the correct conversation params' do
|
||||
allow(Rails.configuration.dispatcher).to receive(:dispatch)
|
||||
expect(conversation.contact_last_seen_at).to eq(nil)
|
||||
expect(conversation.contact_last_seen_at).to be_nil
|
||||
|
||||
post '/api/v1/widget/conversations/update_last_seen',
|
||||
headers: { 'X-Auth-Token' => token },
|
||||
|
@ -133,7 +133,7 @@ RSpec.describe '/api/v1/widget/conversations/toggle_typing', type: :request do
|
|||
|
||||
expect(response).to have_http_status(:success)
|
||||
|
||||
expect(conversation.reload.contact_last_seen_at).not_to eq(nil)
|
||||
expect(conversation.reload.contact_last_seen_at).not_to be_nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -82,7 +82,7 @@ RSpec.describe '/api/v1/widget/messages', type: :request do
|
|||
json_response = JSON.parse(response.body)
|
||||
expect(json_response['content']).to eq(message_params[:content])
|
||||
|
||||
expect(conversation.messages.last.attachments.first.file.present?).to eq(true)
|
||||
expect(conversation.messages.last.attachments.first.file.present?).to be(true)
|
||||
expect(conversation.messages.last.attachments.first.file_type).to eq('image')
|
||||
end
|
||||
|
||||
|
@ -96,7 +96,7 @@ RSpec.describe '/api/v1/widget/messages', type: :request do
|
|||
as: :json
|
||||
|
||||
expect(response).to have_http_status(:success)
|
||||
expect(conversation.reload.resolved?).to eq(true)
|
||||
expect(conversation.reload.resolved?).to be(true)
|
||||
end
|
||||
|
||||
it 'does not create resolved activity messages when snoozed conversation is opened' do
|
||||
|
@ -118,7 +118,7 @@ RSpec.describe '/api/v1/widget/messages', type: :request do
|
|||
}
|
||||
)
|
||||
expect(response).to have_http_status(:success)
|
||||
expect(conversation.reload.open?).to eq(true)
|
||||
expect(conversation.reload.open?).to be(true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue