chore: Update dependencies to the latest versions (#5033)
This commit is contained in:
@@ -221,7 +221,7 @@ RSpec.describe Conversation, type: :model do
|
||||
expect(conversation.label_list).to match_array(labels)
|
||||
|
||||
updated_labels = [second_label, third_label].map(&:title)
|
||||
expect(conversation.update_labels(updated_labels)).to eq(true)
|
||||
expect(conversation.update_labels(updated_labels)).to be(true)
|
||||
expect(conversation.label_list).to match_array(updated_labels)
|
||||
|
||||
expect(Conversations::ActivityMessageJob)
|
||||
@@ -238,25 +238,25 @@ RSpec.describe Conversation, type: :model do
|
||||
describe '#toggle_status' do
|
||||
it 'toggles conversation status to resolved when open' do
|
||||
conversation = create(:conversation, status: 'open')
|
||||
expect(conversation.toggle_status).to eq(true)
|
||||
expect(conversation.toggle_status).to be(true)
|
||||
expect(conversation.reload.status).to eq('resolved')
|
||||
end
|
||||
|
||||
it 'toggles conversation status to open when resolved' do
|
||||
conversation = create(:conversation, status: 'resolved')
|
||||
expect(conversation.toggle_status).to eq(true)
|
||||
expect(conversation.toggle_status).to be(true)
|
||||
expect(conversation.reload.status).to eq('open')
|
||||
end
|
||||
|
||||
it 'toggles conversation status to open when pending' do
|
||||
conversation = create(:conversation, status: 'pending')
|
||||
expect(conversation.toggle_status).to eq(true)
|
||||
expect(conversation.toggle_status).to be(true)
|
||||
expect(conversation.reload.status).to eq('open')
|
||||
end
|
||||
|
||||
it 'toggles conversation status to open when snoozed' do
|
||||
conversation = create(:conversation, status: 'snoozed')
|
||||
expect(conversation.toggle_status).to eq(true)
|
||||
expect(conversation.toggle_status).to be(true)
|
||||
expect(conversation.reload.status).to eq('open')
|
||||
end
|
||||
end
|
||||
@@ -264,9 +264,9 @@ RSpec.describe Conversation, type: :model do
|
||||
describe '#ensure_snooze_until_reset' do
|
||||
it 'resets the snoozed_until when status is toggled' do
|
||||
conversation = create(:conversation, status: 'snoozed', snoozed_until: 2.days.from_now)
|
||||
expect(conversation.snoozed_until).not_to eq nil
|
||||
expect(conversation.toggle_status).to eq(true)
|
||||
expect(conversation.reload.snoozed_until).to eq(nil)
|
||||
expect(conversation.snoozed_until).not_to be_nil
|
||||
expect(conversation.toggle_status).to be(true)
|
||||
expect(conversation.reload.snoozed_until).to be_nil
|
||||
end
|
||||
end
|
||||
|
||||
@@ -283,12 +283,12 @@ RSpec.describe Conversation, type: :model do
|
||||
|
||||
it 'marks conversation as resolved' do
|
||||
mute!
|
||||
expect(conversation.reload.resolved?).to eq(true)
|
||||
expect(conversation.reload.resolved?).to be(true)
|
||||
end
|
||||
|
||||
it 'marks conversation as muted in redis' do
|
||||
mute!
|
||||
expect(Redis::Alfred.get(conversation.send(:mute_key))).not_to eq(nil)
|
||||
expect(Redis::Alfred.get(conversation.send(:mute_key))).not_to be_nil
|
||||
end
|
||||
|
||||
it 'creates mute message' do
|
||||
@@ -335,11 +335,11 @@ RSpec.describe Conversation, type: :model do
|
||||
|
||||
it 'return true if conversation is muted' do
|
||||
conversation.mute!
|
||||
expect(muted?).to eq(true)
|
||||
expect(muted?).to be(true)
|
||||
end
|
||||
|
||||
it 'returns false if conversation is not muted' do
|
||||
expect(muted?).to eq(false)
|
||||
expect(muted?).to be(false)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -475,7 +475,7 @@ RSpec.describe Conversation, type: :model do
|
||||
let(:conversation) { create(:conversation) }
|
||||
|
||||
it 'returns true' do
|
||||
expect(conversation.can_reply?).to eq true
|
||||
expect(conversation.can_reply?).to be true
|
||||
end
|
||||
|
||||
it 'return true for facebook channels' do
|
||||
@@ -484,8 +484,8 @@ RSpec.describe Conversation, type: :model do
|
||||
facebook_inbox = create(:inbox, channel: facebook_channel, account: facebook_channel.account)
|
||||
fb_conversation = create(:conversation, inbox: facebook_inbox, account: facebook_channel.account)
|
||||
|
||||
expect(fb_conversation.can_reply?).to eq true
|
||||
expect(facebook_channel.messaging_window_enabled?).to eq false
|
||||
expect(fb_conversation.can_reply?).to be true
|
||||
expect(facebook_channel.messaging_window_enabled?).to be false
|
||||
end
|
||||
end
|
||||
|
||||
@@ -511,7 +511,7 @@ RSpec.describe Conversation, type: :model do
|
||||
created_at: Time.now - 48.hours
|
||||
)
|
||||
|
||||
expect(conversation.can_reply?).to eq true
|
||||
expect(conversation.can_reply?).to be true
|
||||
end
|
||||
|
||||
it 'return false without HUMAN_AGENT if it is outside of 24 hour window' do
|
||||
@@ -526,7 +526,7 @@ RSpec.describe Conversation, type: :model do
|
||||
created_at: Time.now - 48.hours
|
||||
)
|
||||
|
||||
expect(conversation.can_reply?).to eq false
|
||||
expect(conversation.can_reply?).to be false
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -546,8 +546,8 @@ RSpec.describe Conversation, type: :model do
|
||||
created_at: Time.now - 13.hours
|
||||
)
|
||||
|
||||
expect(api_channel.additional_attributes['agent_reply_time_window']).to eq nil
|
||||
expect(conversation.can_reply?).to eq true
|
||||
expect(api_channel.additional_attributes['agent_reply_time_window']).to be_nil
|
||||
expect(conversation.can_reply?).to be true
|
||||
end
|
||||
end
|
||||
|
||||
@@ -563,7 +563,7 @@ RSpec.describe Conversation, type: :model do
|
||||
)
|
||||
|
||||
expect(api_channel_with_limit.additional_attributes['agent_reply_time_window']).to eq '12'
|
||||
expect(conversation.can_reply?).to eq false
|
||||
expect(conversation.can_reply?).to be false
|
||||
end
|
||||
|
||||
it 'return true if it is inside of agent_reply_time_window' do
|
||||
@@ -574,7 +574,7 @@ RSpec.describe Conversation, type: :model do
|
||||
inbox: api_channel_with_limit.inbox,
|
||||
conversation: conversation
|
||||
)
|
||||
expect(conversation.can_reply?).to eq true
|
||||
expect(conversation.can_reply?).to be true
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -595,7 +595,7 @@ RSpec.describe Conversation, type: :model do
|
||||
let(:conversation) { create(:conversation, additional_attributes: { referer: 'javascript' }) }
|
||||
|
||||
it 'returns nil' do
|
||||
expect(conversation['additional_attributes']['referer']).to eq(nil)
|
||||
expect(conversation['additional_attributes']['referer']).to be_nil
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user