Maintenance: Bump rubocop-rspec from 2.8.0 to 2.9.0

Bumps [rubocop-rspec](https://github.com/rubocop/rubocop-rspec) from 2.8.0 to 2.9.0.
- [Release notes](https://github.com/rubocop/rubocop-rspec/releases)
- [Changelog](https://github.com/rubocop/rubocop-rspec/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-rspec/compare/v2.8.0...v2.9.0)
This commit is contained in:
Martin Gruner 2022-03-01 09:00:40 +01:00
parent b8f5eb6a7d
commit 563d2d1e3d
54 changed files with 391 additions and 391 deletions

View file

@ -364,7 +364,7 @@ GEM
iniparse (~> 1.4)
rexml (~> 3.2)
parallel (1.21.0)
parser (3.1.0.0)
parser (3.1.1.0)
ast (~> 2.4.1)
pg (0.21.0)
power_assert (2.0.1)
@ -433,7 +433,7 @@ GEM
ffi (~> 1.0)
rchardet (1.8.0)
redis (4.6.0)
regexp_parser (2.2.0)
regexp_parser (2.2.1)
rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0)
http-cookie (>= 1.0.2, < 2.0)
@ -467,8 +467,8 @@ GEM
rubocop-ast (>= 1.15.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.15.1)
parser (>= 3.0.1.1)
rubocop-ast (1.16.0)
parser (>= 3.1.1.0)
rubocop-faker (1.1.0)
faker (>= 2.12.0)
rubocop (>= 0.82.0)
@ -483,7 +483,7 @@ GEM
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.7.0, < 2.0)
rubocop-rspec (2.8.0)
rubocop-rspec (2.9.0)
rubocop (~> 1.19)
ruby-progressbar (1.11.0)
ruby-saml (1.13.0)

View file

@ -11,7 +11,7 @@ RSpec.describe Issue3567AutoAssignment, type: :db_migration, db_strategy: :reset
it 'config gets removed' do
config = Setting.get('ticket_auto_assignment_selector')
expect(config['condition']['article.subject']).to be nil
expect(config['condition']['article.subject']).to be_nil
end
end
end

View file

@ -12,7 +12,7 @@ RSpec.describe Issue3617UserImageSourceFix, type: :db_migration, db_strategy: :r
it 'removes invalid image sources' do
migrate
expect(user.reload.image_source).to eq(nil)
expect(user.reload.image_source).to be_nil
end
end

View file

@ -15,18 +15,18 @@ RSpec.describe Issue3851, type: :db_migration do
end
it 'shows field follow_up_assignment required in create' do
expect(follow_up_assignment.screens['create']['-all-']['null']).to eq(false)
expect(follow_up_assignment.screens['create']['-all-']['null']).to be(false)
end
it 'shows field follow_up_assignment required in edit' do
expect(follow_up_assignment.screens['edit']['-all-']['null']).to eq(false)
expect(follow_up_assignment.screens['edit']['-all-']['null']).to be(false)
end
it 'shows field follow_up_possible required in create' do
expect(follow_up_possible.screens['create']['-all-']['null']).to eq(false)
expect(follow_up_possible.screens['create']['-all-']['null']).to be(false)
end
it 'shows field follow_up_possible required in edit' do
expect(follow_up_possible.screens['edit']['-all-']['null']).to eq(false)
expect(follow_up_possible.screens['edit']['-all-']['null']).to be(false)
end
end

View file

@ -56,14 +56,14 @@ RSpec.describe Import::OTRS::ArticleCustomer do
describe '.find' do
it 'returns nil if no email could be found' do
expect(described_class.find({})).to be nil
expect(described_class.find({})).to be_nil
end
end
describe '.local_email' do
it 'returns nil if no email could be found' do
expect(described_class.local_email(nil)).to be nil
expect(described_class.local_email(nil)).to be_nil
end
it 'returns the parameter if no email could be found' do

View file

@ -107,7 +107,7 @@ RSpec.describe Ldap::Group do
it 'fails if no filter found entries' do
allow(mocked_ldap).to receive(:entries?).and_return(false)
expect(instance.filter).to be nil
expect(instance.filter).to be_nil
end
end

View file

@ -28,7 +28,7 @@ RSpec.describe Ldap::User do
attributes = {
custom: 'value',
}
expect(described_class.uid_attribute(attributes)).to be nil
expect(described_class.uid_attribute(attributes)).to be_nil
end
end
@ -183,7 +183,7 @@ RSpec.describe Ldap::User do
it 'fails if no filter found entries' do
allow(mocked_ldap).to receive(:entries?).and_return(false)
expect(instance.filter).to be nil
expect(instance.filter).to be_nil
end
end
@ -212,7 +212,7 @@ RSpec.describe Ldap::User do
it 'fails if no uid attribute could be found' do
expect(mocked_ldap).to receive(:search)
expect(instance.uid_attribute).to be nil
expect(instance.uid_attribute).to be_nil
end
end
end

View file

@ -267,7 +267,7 @@ RSpec.describe SecureMailing::SMIME do
expect(mail['x-zammad-article-preferences'][:security][:sign][:success]).to be true
expect(mail['x-zammad-article-preferences'][:security][:sign][:comment]).to eq(sender_certificate_subject)
expect(mail['x-zammad-article-preferences'][:security][:encryption][:success]).to be false
expect(mail['x-zammad-article-preferences'][:security][:encryption][:comment]).to be nil
expect(mail['x-zammad-article-preferences'][:security][:encryption][:comment]).to be_nil
end
it_behaves_like 'HttpLog writer', 'success'
@ -283,7 +283,7 @@ RSpec.describe SecureMailing::SMIME do
expect(mail['x-zammad-article-preferences'][:security][:sign][:success]).to be true
expect(mail['x-zammad-article-preferences'][:security][:sign][:comment]).to include(expired_email_address).and include('expired')
expect(mail['x-zammad-article-preferences'][:security][:encryption][:success]).to be false
expect(mail['x-zammad-article-preferences'][:security][:encryption][:comment]).to be nil
expect(mail['x-zammad-article-preferences'][:security][:encryption][:comment]).to be_nil
end
it_behaves_like 'HttpLog writer', 'success'
@ -329,7 +329,7 @@ RSpec.describe SecureMailing::SMIME do
expect(mail['x-zammad-article-preferences'][:security][:sign][:success]).to be false
expect(mail['x-zammad-article-preferences'][:security][:sign][:comment]).to eq('Certificate for verification could not be found.')
expect(mail['x-zammad-article-preferences'][:security][:encryption][:success]).to be false
expect(mail['x-zammad-article-preferences'][:security][:encryption][:comment]).to be nil
expect(mail['x-zammad-article-preferences'][:security][:encryption][:comment]).to be_nil
end
context 'public key present in signature' do
@ -344,7 +344,7 @@ RSpec.describe SecureMailing::SMIME do
expect(mail['x-zammad-article-preferences'][:security][:sign][:success]).to be false
expect(mail['x-zammad-article-preferences'][:security][:sign][:comment]).to eq('Certificate for verification could not be found.')
expect(mail['x-zammad-article-preferences'][:security][:encryption][:success]).to be false
expect(mail['x-zammad-article-preferences'][:security][:encryption][:comment]).to be nil
expect(mail['x-zammad-article-preferences'][:security][:encryption][:comment]).to be_nil
end
it_behaves_like 'HttpLog writer', 'failed'
@ -358,7 +358,7 @@ RSpec.describe SecureMailing::SMIME do
expect(mail['x-zammad-article-preferences'][:security][:sign][:success]).to be false
expect(mail['x-zammad-article-preferences'][:security][:sign][:comment]).to eq('Certificate for verification could not be found.')
expect(mail['x-zammad-article-preferences'][:security][:encryption][:success]).to be false
expect(mail['x-zammad-article-preferences'][:security][:encryption][:comment]).to be nil
expect(mail['x-zammad-article-preferences'][:security][:encryption][:comment]).to be_nil
end
it_behaves_like 'HttpLog writer', 'failed'
@ -377,7 +377,7 @@ RSpec.describe SecureMailing::SMIME do
expect(mail['x-zammad-article-preferences'][:security][:sign][:success]).to be false
expect(mail['x-zammad-article-preferences'][:security][:sign][:comment]).to eq('Certificate for verification could not be found.')
expect(mail['x-zammad-article-preferences'][:security][:encryption][:success]).to be false
expect(mail['x-zammad-article-preferences'][:security][:encryption][:comment]).to be nil
expect(mail['x-zammad-article-preferences'][:security][:encryption][:comment]).to be_nil
end
end
end
@ -395,7 +395,7 @@ RSpec.describe SecureMailing::SMIME do
expect(mail['x-zammad-article-preferences'][:security][:sign][:success]).to be true
expect(mail['x-zammad-article-preferences'][:security][:sign][:comment]).to eq(ca_certificate_subject)
expect(mail['x-zammad-article-preferences'][:security][:encryption][:success]).to be false
expect(mail['x-zammad-article-preferences'][:security][:encryption][:comment]).to be nil
expect(mail['x-zammad-article-preferences'][:security][:encryption][:comment]).to be_nil
end
it_behaves_like 'HttpLog writer', 'success'
@ -408,7 +408,7 @@ RSpec.describe SecureMailing::SMIME do
expect(mail['x-zammad-article-preferences'][:security][:sign][:success]).to be false
expect(mail['x-zammad-article-preferences'][:security][:sign][:comment]).to eq('Certificate for verification could not be found.')
expect(mail['x-zammad-article-preferences'][:security][:encryption][:success]).to be false
expect(mail['x-zammad-article-preferences'][:security][:encryption][:comment]).to be nil
expect(mail['x-zammad-article-preferences'][:security][:encryption][:comment]).to be_nil
end
it_behaves_like 'HttpLog writer', 'failed'
@ -423,7 +423,7 @@ RSpec.describe SecureMailing::SMIME do
expect(mail['x-zammad-article-preferences'][:security][:sign][:success]).to be false
expect(mail['x-zammad-article-preferences'][:security][:sign][:comment]).to eq('Certificate for verification could not be found.')
expect(mail['x-zammad-article-preferences'][:security][:encryption][:success]).to be false
expect(mail['x-zammad-article-preferences'][:security][:encryption][:comment]).to be nil
expect(mail['x-zammad-article-preferences'][:security][:encryption][:comment]).to be_nil
end
it_behaves_like 'HttpLog writer', 'failed'
@ -448,7 +448,7 @@ RSpec.describe SecureMailing::SMIME do
expect(mail['x-zammad-article-preferences'][:security][:sign][:success]).to be false
expect(mail['x-zammad-article-preferences'][:security][:sign][:comment]).to eq('Certificate for verification could not be found.')
expect(mail['x-zammad-article-preferences'][:security][:encryption][:success]).to be false
expect(mail['x-zammad-article-preferences'][:security][:encryption][:comment]).to be nil
expect(mail['x-zammad-article-preferences'][:security][:encryption][:comment]).to be_nil
end
end
@ -467,7 +467,7 @@ RSpec.describe SecureMailing::SMIME do
expect(mail['x-zammad-article-preferences'][:security][:sign][:success]).to be true
expect(mail['x-zammad-article-preferences'][:security][:sign][:comment]).to eq(ca_subject_chain)
expect(mail['x-zammad-article-preferences'][:security][:encryption][:success]).to be false
expect(mail['x-zammad-article-preferences'][:security][:encryption][:comment]).to be nil
expect(mail['x-zammad-article-preferences'][:security][:encryption][:comment]).to be_nil
end
end
@ -488,7 +488,7 @@ RSpec.describe SecureMailing::SMIME do
expect(mail['x-zammad-article-preferences'][:security][:sign][:success]).to be true
expect(mail['x-zammad-article-preferences'][:security][:sign][:comment]).to eq(ca_subject_chain)
expect(mail['x-zammad-article-preferences'][:security][:encryption][:success]).to be false
expect(mail['x-zammad-article-preferences'][:security][:encryption][:comment]).to be nil
expect(mail['x-zammad-article-preferences'][:security][:encryption][:comment]).to be_nil
expect(Rails.logger).not_to have_received(:warn).with(%r{#{Regexp.escape(ca_certificate_subject)}})
end
@ -530,7 +530,7 @@ RSpec.describe SecureMailing::SMIME do
it 'decrypts' do
expect(mail[:body]).to include(raw_body)
expect(mail['x-zammad-article-preferences'][:security][:sign][:success]).to be false
expect(mail['x-zammad-article-preferences'][:security][:sign][:comment]).to be nil
expect(mail['x-zammad-article-preferences'][:security][:sign][:comment]).to be_nil
expect(mail['x-zammad-article-preferences'][:security][:encryption][:success]).to be true
expect(mail['x-zammad-article-preferences'][:security][:encryption][:comment]).to eq(recipient_certificate_subject)
end
@ -544,7 +544,7 @@ RSpec.describe SecureMailing::SMIME do
it 'decrypts with comment' do
expect(mail[:body]).to include(raw_body)
expect(mail['x-zammad-article-preferences'][:security][:sign][:success]).to be false
expect(mail['x-zammad-article-preferences'][:security][:sign][:comment]).to be nil
expect(mail['x-zammad-article-preferences'][:security][:sign][:comment]).to be_nil
expect(mail['x-zammad-article-preferences'][:security][:encryption][:success]).to be true
expect(mail['x-zammad-article-preferences'][:security][:encryption][:comment]).to include(expired_email_address).and include('expired')
end
@ -571,7 +571,7 @@ RSpec.describe SecureMailing::SMIME do
it 'fails' do
expect(mail[:body]).to include('no visible content')
expect(mail['x-zammad-article-preferences'][:security][:sign][:success]).to be false
expect(mail['x-zammad-article-preferences'][:security][:sign][:comment]).to be nil
expect(mail['x-zammad-article-preferences'][:security][:sign][:comment]).to be_nil
expect(mail['x-zammad-article-preferences'][:security][:encryption][:success]).to be false
expect(mail['x-zammad-article-preferences'][:security][:encryption][:comment]).to eq('Private key for decryption could not be found.')
end

View file

@ -84,14 +84,14 @@ RSpec.describe Sessions::Backend::TicketOverviewList do
let!(:first_call) { collection.push }
it 'returns nil' do
expect(collection.push).to eq(nil)
expect(collection.push).to be_nil
end
context 'even after the TTL has passed' do
before { travel(ttl + 1) }
it 'returns nil' do
expect(collection.push).to eq(nil)
expect(collection.push).to be_nil
end
end
@ -99,7 +99,7 @@ RSpec.describe Sessions::Backend::TicketOverviewList do
before { described_class.reset(admin.id) }
it 'returns nil' do
expect(collection.push).to eq(nil)
expect(collection.push).to be_nil
end
end
end
@ -110,14 +110,14 @@ RSpec.describe Sessions::Backend::TicketOverviewList do
context 'before the TTL has passed' do
it 'returns nil' do
expect(collection.push).to eq(nil)
expect(collection.push).to be_nil
end
context 'after .reset with the users id' do
before { described_class.reset(admin.id) }
it 'returns nil because no ticket and no overview has changed' do
expect(collection.push).to eq(nil)
expect(collection.push).to be_nil
end
end
end
@ -126,7 +126,7 @@ RSpec.describe Sessions::Backend::TicketOverviewList do
before { travel(ttl + 1) }
it 'returns an empty result' do
expect(collection.push).to eq(nil)
expect(collection.push).to be_nil
end
end
@ -134,7 +134,7 @@ RSpec.describe Sessions::Backend::TicketOverviewList do
before { travel(2.hours + 1.second) }
it 'returns an empty result' do
expect(collection.push).to eq(nil)
expect(collection.push).to be_nil
end
end
end
@ -146,7 +146,7 @@ RSpec.describe Sessions::Backend::TicketOverviewList do
context 'before the TTL has passed' do
it 'returns nil' do
expect(collection.push).to be(nil)
expect(collection.push).to be_nil
end
context 'after .reset with the users id' do

View file

@ -75,7 +75,7 @@ RSpec.describe Sessions::Event::ChatSessionStart do
context 'without chat.agent permissions' do
it 'send out no_permission event to user' do
expect(subject_as_customer.run).to eq(nil)
expect(subject_as_customer.run).to be_nil
messages = Sessions.queue(client_id)
expect(messages.count).to eq(1)
expect(messages).to eq([
@ -112,7 +112,7 @@ RSpec.describe Sessions::Event::ChatSessionStart do
context 'when starting a chat session as agent' do
it 'send out chat_session_start to customer and agent' do
expect(subject_as_agent.run).to eq(nil)
expect(subject_as_agent.run).to be_nil
messages_to_customer = Sessions.queue('customer_session_id')
expect(messages_to_customer.count).to eq(1)
@ -156,7 +156,7 @@ RSpec.describe Sessions::Event::ChatSessionStart do
agent.preferences[:chat][:alternative_name] = 'some name'
agent.preferences[:chat][:avatar_state] = 'disabled'
agent.save!
expect(subject_as_agent.run).to eq(nil)
expect(subject_as_agent.run).to be_nil
messages_to_customer = Sessions.queue('customer_session_id')
expect(messages_to_customer.count).to eq(1)
@ -197,7 +197,7 @@ RSpec.describe Sessions::Event::ChatSessionStart do
context 'when starting a chat session as agent with transferred conversation' do
it 'send out chat_session_start to customer and agent with already created messages' do
chat_message_history
expect(subject_as_agent.run).to eq(nil)
expect(subject_as_agent.run).to be_nil
messages_to_customer = Sessions.queue('customer_session_id')
expect(messages_to_customer.count).to eq(0)

View file

@ -51,7 +51,7 @@ RSpec.describe Sessions::Event::ChatTransfer do
context 'without chat.agent permissions' do
it 'send out no_permission event to user' do
expect(subject_as_customer.run).to eq(nil)
expect(subject_as_customer.run).to be_nil
messages = Sessions.queue(client_id)
expect(messages.count).to eq(1)
expect(messages).to eq([
@ -66,7 +66,7 @@ RSpec.describe Sessions::Event::ChatTransfer do
context 'when transferring a chat session as agent' do
it 'send out chat_session_notice to customer and agent and set chat session to waiting' do
expect(subject_as_agent.run).to eq(nil)
expect(subject_as_agent.run).to be_nil
messages_to_customer = Sessions.queue('customer_session_id')
expect(messages_to_customer.count).to eq(1)

View file

@ -119,7 +119,7 @@ RSpec.describe SignatureDetection do
end
it 'does not detect the warning information as signature' do
expect(described_class.find_signature(messages)).to eq(nil)
expect(described_class.find_signature(messages)).to be_nil
end
end
end

View file

@ -7,7 +7,7 @@ RSpec.describe UserInfo do
describe '#current_user_id' do
it 'is nil by default' do
expect(described_class.current_user_id).to be nil
expect(described_class.current_user_id).to be_nil
end
it 'takes a User ID as paramter and returns it' do
@ -39,7 +39,7 @@ RSpec.describe UserInfo do
expect(described_class.current_user_id).to eq(1)
end
expect(described_class.current_user_id).to be nil
expect(described_class.current_user_id).to be_nil
end
it 'resets current_user_id in case of an exception' do
@ -50,7 +50,7 @@ RSpec.describe UserInfo do
rescue # rubocop:disable Lint/SuppressedException
end
expect(described_class.current_user_id).to be nil
expect(described_class.current_user_id).to be_nil
end
it 'passes return value of given block' do

View file

@ -109,7 +109,7 @@ RSpec.describe Calendar, type: :model do
context 'when called explicitly after creation' do
it 'writes #public_holidays to the cache (valid for 1 day)' do
expect(Cache.read("CalendarIcal::#{calendar.id}")).to be(nil)
expect(Cache.read("CalendarIcal::#{calendar.id}")).to be_nil
expect { calendar.sync }
.to change { Cache.read("CalendarIcal::#{calendar.id}") }

View file

@ -17,7 +17,7 @@ RSpec.describe Channel::Filter::FollowUpAssignment, type: :channel_filter do
filter(mail)
expect(mail[:'x-zammad-ticket-followup-owner']).to be nil
expect(mail[:'x-zammad-ticket-followup-owner']).to be_nil
end
end
@ -31,7 +31,7 @@ RSpec.describe Channel::Filter::FollowUpAssignment, type: :channel_filter do
filter(mail)
expect(mail[:'x-zammad-ticket-followup-owner']).to be nil
expect(mail[:'x-zammad-ticket-followup-owner']).to be_nil
end
end
end
@ -63,7 +63,7 @@ RSpec.describe Channel::Filter::FollowUpAssignment, type: :channel_filter do
filter(mail)
expect(mail[:'x-zammad-ticket-followup-owner']).to be nil
expect(mail[:'x-zammad-ticket-followup-owner']).to be_nil
end
end
end

View file

@ -58,7 +58,7 @@ RSpec.describe Chat::Agent, type: :model do
end
it 'returns false' do
expect(described_class.state(record.updated_by_id, record.active)).to eq(false)
expect(described_class.state(record.updated_by_id, record.active)).to be(false)
end
end
@ -77,7 +77,7 @@ RSpec.describe Chat::Agent, type: :model do
end
it 'returns true' do
expect(described_class.state(record.updated_by_id, !record.active)).to eq(true)
expect(described_class.state(record.updated_by_id, !record.active)).to be(true)
end
end
end

View file

@ -295,7 +295,7 @@ RSpec.describe CoreWorkflow, type: :model do
end
it 'does show the field as optional because it has no required value' do
expect(result[:mandatory][field_name]).to eq(false)
expect(result[:mandatory][field_name]).to be(false)
end
end
@ -370,15 +370,15 @@ RSpec.describe CoreWorkflow, type: :model do
end
it 'does set first_response_time_in_text optional' do
expect(result[:mandatory]['first_response_time_in_text']).to eq(false)
expect(result[:mandatory]['first_response_time_in_text']).to be(false)
end
it 'does set update_time_in_text optional' do
expect(result[:mandatory]['update_time_in_text']).to eq(false)
expect(result[:mandatory]['update_time_in_text']).to be(false)
end
it 'does set solution_time_in_text optional' do
expect(result[:mandatory]['solution_time_in_text']).to eq(false)
expect(result[:mandatory]['solution_time_in_text']).to be(false)
end
describe 'on first_response_time_enabled' do
@ -391,15 +391,15 @@ RSpec.describe CoreWorkflow, type: :model do
end
it 'does set first_response_time_in_text mandatory' do
expect(result[:mandatory]['first_response_time_in_text']).to eq(true)
expect(result[:mandatory]['first_response_time_in_text']).to be(true)
end
it 'does set update_time_in_text optional' do
expect(result[:mandatory]['update_time_in_text']).to eq(false)
expect(result[:mandatory]['update_time_in_text']).to be(false)
end
it 'does set solution_time_in_text optional' do
expect(result[:mandatory]['solution_time_in_text']).to eq(false)
expect(result[:mandatory]['solution_time_in_text']).to be(false)
end
end
@ -413,15 +413,15 @@ RSpec.describe CoreWorkflow, type: :model do
end
it 'does set first_response_time_in_text optional' do
expect(result[:mandatory]['first_response_time_in_text']).to eq(false)
expect(result[:mandatory]['first_response_time_in_text']).to be(false)
end
it 'does set update_time_in_text mandatory' do
expect(result[:mandatory]['update_time_in_text']).to eq(true)
expect(result[:mandatory]['update_time_in_text']).to be(true)
end
it 'does set solution_time_in_text optional' do
expect(result[:mandatory]['solution_time_in_text']).to eq(false)
expect(result[:mandatory]['solution_time_in_text']).to be(false)
end
end
@ -435,15 +435,15 @@ RSpec.describe CoreWorkflow, type: :model do
end
it 'does set first_response_time_in_text optional' do
expect(result[:mandatory]['first_response_time_in_text']).to eq(false)
expect(result[:mandatory]['first_response_time_in_text']).to be(false)
end
it 'does set update_time_in_text optional' do
expect(result[:mandatory]['update_time_in_text']).to eq(false)
expect(result[:mandatory]['update_time_in_text']).to be(false)
end
it 'does set solution_time_in_text mandatory' do
expect(result[:mandatory]['solution_time_in_text']).to eq(true)
expect(result[:mandatory]['solution_time_in_text']).to be(true)
end
end
end
@ -1220,7 +1220,7 @@ RSpec.describe CoreWorkflow, type: :model do
end
it 'does not select owner' do
expect(result[:select]['owner_id']).to be nil
expect(result[:select]['owner_id']).to be_nil
end
it 'does rerun 0 times' do
@ -1326,7 +1326,7 @@ RSpec.describe CoreWorkflow, type: :model do
end
it 'does not fill in title' do
expect(result[:fill_in]['title']).to be nil
expect(result[:fill_in]['title']).to be_nil
end
it 'does rerun 1 times (group select)' do
@ -1518,7 +1518,7 @@ RSpec.describe CoreWorkflow, type: :model do
describe '.perform - Default - auto selection based on only_shown_if_selectable' do
it 'does auto select group' do
expect(result[:select]['group_id']).not_to be nil
expect(result[:select]['group_id']).not_to be_nil
end
it 'does auto hide group' do
@ -1544,7 +1544,7 @@ RSpec.describe CoreWorkflow, type: :model do
end
it 'does set owner optional' do
expect(result[:mandatory]['owner_id']).to eq(false)
expect(result[:mandatory]['owner_id']).to be(false)
end
end
@ -1628,7 +1628,7 @@ RSpec.describe CoreWorkflow, type: :model do
end
it 'does set group readonly' do
expect(result[:readonly]['group_id']).to eq(true)
expect(result[:readonly]['group_id']).to be(true)
end
context 'when readonly unset' do
@ -1648,7 +1648,7 @@ RSpec.describe CoreWorkflow, type: :model do
end
it 'does set group readonly' do
expect(result[:readonly]['group_id']).to eq(false)
expect(result[:readonly]['group_id']).to be(false)
end
end
end

View file

@ -15,7 +15,7 @@ RSpec.describe Cti::Driver::Base do
subject!(:direction) { 'in' }
it 'returns nil' do
expect(driver.direction_check).to be(nil)
expect(driver.direction_check).to be_nil
end
end
@ -23,7 +23,7 @@ RSpec.describe Cti::Driver::Base do
subject!(:direction) { 'out' }
it 'returns nil' do
expect(driver.direction_check).to be(nil)
expect(driver.direction_check).to be_nil
end
end
@ -64,7 +64,7 @@ RSpec.describe Cti::Driver::Base do
end
it 'returns nil' do
expect(driver.reject_check).to be(nil)
expect(driver.reject_check).to be_nil
end
end
@ -80,7 +80,7 @@ RSpec.describe Cti::Driver::Base do
end
it 'returns nil' do
expect(driver.reject_check).to be(nil)
expect(driver.reject_check).to be_nil
end
end
end
@ -100,7 +100,7 @@ RSpec.describe Cti::Driver::Base do
let!(:user) { create(:agent, phone: '1234567') }
it 'returns nil' do
expect(driver.push_open_ticket_screen_recipient).to be(nil)
expect(driver.push_open_ticket_screen_recipient).to be_nil
end
end

View file

@ -79,7 +79,7 @@ RSpec.describe Cti::Log do
before { travel(-10.seconds) }
it 'return false' do
expect(described_class.push_caller_list_update?(log)).to eq false
expect(described_class.push_caller_list_update?(log)).to be false
end
end
@ -87,7 +87,7 @@ RSpec.describe Cti::Log do
before { travel(10.seconds) }
it 'return true' do
expect(described_class.push_caller_list_update?(log)).to eq true
expect(described_class.push_caller_list_update?(log)).to be true
end
end
end
@ -277,7 +277,7 @@ RSpec.describe Cti::Log do
context 'with now related customer' do
it 'gives no caller information' do
expect(log.preferences[:from]).to eq(nil)
expect(log.preferences[:from]).to be_nil
end
end

View file

@ -72,7 +72,7 @@ RSpec.describe ObjectManager::Attribute::SetDefaults, type: :model do
subject(:example) { create :ticket }
it 'boolean is set' do
expect(example.rspec_boolean).to eq true
expect(example.rspec_boolean).to be true
end
it 'date is set' do

View file

@ -55,12 +55,12 @@ RSpec.describe Organization, type: :model do
context 'without associations' do
it 'checks user deletion' do
organization.destroy
expect(user.reload.organization_id).to be nil
expect(user.reload.organization_id).to be_nil
end
it 'checks ticket deletion' do
organization.destroy
expect(ticket.reload.organization_id).to be nil
expect(ticket.reload.organization_id).to be_nil
end
end

View file

@ -17,8 +17,8 @@ RSpec.describe Session, type: :model do
subject(:session) { described_class.create(session_id: SecureRandom.urlsafe_base64(64), data: { 'persistent' => true }) }
it 'sets the persistent attribute in the session and removes the persistent attribute from the data payload' do
expect(session.persistent).to eq(true)
expect(session.persistent).to eq(true)
expect(session.persistent).to be(true)
expect(session.persistent).to be(true)
end
end

View file

@ -10,7 +10,7 @@ RSpec.describe SMIMECertificate, type: :model do
context 'no certificate present' do
it 'returns nil' do
expect(described_class.for_sender_email_address(lookup_address)).to be nil
expect(described_class.for_sender_email_address(lookup_address)).to be_nil
end
end
@ -32,7 +32,7 @@ RSpec.describe SMIMECertificate, type: :model do
end
it 'returns nil' do
expect(described_class.for_sender_email_address(lookup_address)).to be nil
expect(described_class.for_sender_email_address(lookup_address)).to be_nil
end
end

View file

@ -66,7 +66,7 @@ RSpec.describe Taskbar do
end
it 'state' do
expect(taskbar.state.blank?).to eq(true)
expect(taskbar.state.blank?).to be(true)
end
it 'check last_contact' do
@ -156,16 +156,16 @@ RSpec.describe Taskbar do
taskbar1.reload
expect(taskbar1.preferences[:tasks].count).to eq(2)
expect(taskbar1.preferences[:tasks][0][:user_id]).to eq(1)
expect(taskbar1.preferences[:tasks][0][:changed]).to eq(false)
expect(taskbar1.preferences[:tasks][0][:changed]).to be(false)
expect(taskbar1.preferences[:tasks][1][:user_id]).to eq(2)
expect(taskbar1.preferences[:tasks][1][:changed]).to eq(false)
expect(taskbar1.preferences[:tasks][1][:changed]).to be(false)
taskbar2.reload
expect(taskbar2.preferences[:tasks].count).to eq(2)
expect(taskbar2.preferences[:tasks][0][:user_id]).to eq(1)
expect(taskbar2.preferences[:tasks][0][:changed]).to eq(false)
expect(taskbar2.preferences[:tasks][0][:changed]).to be(false)
expect(taskbar2.preferences[:tasks][1][:user_id]).to eq(2)
expect(taskbar2.preferences[:tasks][1][:changed]).to eq(false)
expect(taskbar2.preferences[:tasks][1][:changed]).to be(false)
taskbar3 = described_class.create(
client_id: 123,
@ -183,21 +183,21 @@ RSpec.describe Taskbar do
taskbar1.reload
expect(taskbar1.preferences[:tasks].count).to eq(2)
expect(taskbar1.preferences[:tasks][0][:user_id]).to eq(1)
expect(taskbar1.preferences[:tasks][0][:changed]).to eq(false)
expect(taskbar1.preferences[:tasks][0][:changed]).to be(false)
expect(taskbar1.preferences[:tasks][1][:user_id]).to eq(2)
expect(taskbar1.preferences[:tasks][1][:changed]).to eq(false)
expect(taskbar1.preferences[:tasks][1][:changed]).to be(false)
taskbar2.reload
expect(taskbar2.preferences[:tasks].count).to eq(2)
expect(taskbar2.preferences[:tasks][0][:user_id]).to eq(1)
expect(taskbar2.preferences[:tasks][0][:changed]).to eq(false)
expect(taskbar2.preferences[:tasks][0][:changed]).to be(false)
expect(taskbar2.preferences[:tasks][1][:user_id]).to eq(2)
expect(taskbar2.preferences[:tasks][1][:changed]).to eq(false)
expect(taskbar2.preferences[:tasks][1][:changed]).to be(false)
taskbar3.reload
expect(taskbar3.preferences[:tasks].count).to eq(1)
expect(taskbar3.preferences[:tasks][0][:user_id]).to eq(2)
expect(taskbar3.preferences[:tasks][0][:changed]).to eq(false)
expect(taskbar3.preferences[:tasks][0][:changed]).to be(false)
agent_id = create(:agent).id
UserInfo.current_user_id = agent_id
@ -218,34 +218,34 @@ RSpec.describe Taskbar do
taskbar1.reload
expect(taskbar1.preferences[:tasks].count).to eq(3)
expect(taskbar1.preferences[:tasks][0][:user_id]).to eq(1)
expect(taskbar1.preferences[:tasks][0][:changed]).to eq(false)
expect(taskbar1.preferences[:tasks][0][:changed]).to be(false)
expect(taskbar1.preferences[:tasks][1][:user_id]).to eq(2)
expect(taskbar1.preferences[:tasks][1][:changed]).to eq(false)
expect(taskbar1.preferences[:tasks][1][:changed]).to be(false)
expect(taskbar1.preferences[:tasks][2][:user_id]).to eq(agent_id)
expect(taskbar1.preferences[:tasks][2][:changed]).to eq(false)
expect(taskbar1.preferences[:tasks][2][:changed]).to be(false)
taskbar2.reload
expect(taskbar2.preferences[:tasks].count).to eq(3)
expect(taskbar2.preferences[:tasks][0][:user_id]).to eq(1)
expect(taskbar2.preferences[:tasks][0][:changed]).to eq(false)
expect(taskbar2.preferences[:tasks][0][:changed]).to be(false)
expect(taskbar2.preferences[:tasks][1][:user_id]).to eq(2)
expect(taskbar2.preferences[:tasks][1][:changed]).to eq(false)
expect(taskbar2.preferences[:tasks][1][:changed]).to be(false)
expect(taskbar2.preferences[:tasks][2][:user_id]).to eq(agent_id)
expect(taskbar2.preferences[:tasks][2][:changed]).to eq(false)
expect(taskbar2.preferences[:tasks][2][:changed]).to be(false)
taskbar3.reload
expect(taskbar3.preferences[:tasks].count).to eq(1)
expect(taskbar3.preferences[:tasks][0][:user_id]).to eq(2)
expect(taskbar3.preferences[:tasks][0][:changed]).to eq(false)
expect(taskbar3.preferences[:tasks][0][:changed]).to be(false)
taskbar4.reload
expect(taskbar4.preferences[:tasks].count).to eq(3)
expect(taskbar4.preferences[:tasks][0][:user_id]).to eq(1)
expect(taskbar4.preferences[:tasks][0][:changed]).to eq(false)
expect(taskbar4.preferences[:tasks][0][:changed]).to be(false)
expect(taskbar4.preferences[:tasks][1][:user_id]).to eq(2)
expect(taskbar4.preferences[:tasks][1][:changed]).to eq(false)
expect(taskbar4.preferences[:tasks][1][:changed]).to be(false)
expect(taskbar4.preferences[:tasks][2][:user_id]).to eq(agent_id)
expect(taskbar4.preferences[:tasks][2][:changed]).to eq(false)
expect(taskbar4.preferences[:tasks][2][:changed]).to be(false)
UserInfo.current_user_id = 2
taskbar2.state = { article: {}, ticket: {} }
@ -254,34 +254,34 @@ RSpec.describe Taskbar do
taskbar1.reload
expect(taskbar1.preferences[:tasks].count).to eq(3)
expect(taskbar1.preferences[:tasks][0][:user_id]).to eq(1)
expect(taskbar1.preferences[:tasks][0][:changed]).to eq(false)
expect(taskbar1.preferences[:tasks][0][:changed]).to be(false)
expect(taskbar1.preferences[:tasks][1][:user_id]).to eq(2)
expect(taskbar1.preferences[:tasks][1][:changed]).to eq(false)
expect(taskbar1.preferences[:tasks][1][:changed]).to be(false)
expect(taskbar1.preferences[:tasks][2][:user_id]).to eq(agent_id)
expect(taskbar1.preferences[:tasks][2][:changed]).to eq(false)
expect(taskbar1.preferences[:tasks][2][:changed]).to be(false)
taskbar2.reload
expect(taskbar2.preferences[:tasks].count).to eq(3)
expect(taskbar2.preferences[:tasks][0][:user_id]).to eq(1)
expect(taskbar2.preferences[:tasks][0][:changed]).to eq(false)
expect(taskbar2.preferences[:tasks][0][:changed]).to be(false)
expect(taskbar2.preferences[:tasks][1][:user_id]).to eq(2)
expect(taskbar2.preferences[:tasks][1][:changed]).to eq(false)
expect(taskbar2.preferences[:tasks][1][:changed]).to be(false)
expect(taskbar2.preferences[:tasks][2][:user_id]).to eq(agent_id)
expect(taskbar2.preferences[:tasks][2][:changed]).to eq(false)
expect(taskbar2.preferences[:tasks][2][:changed]).to be(false)
taskbar3.reload
expect(taskbar3.preferences[:tasks].count).to eq(1)
expect(taskbar3.preferences[:tasks][0][:user_id]).to eq(2)
expect(taskbar3.preferences[:tasks][0][:changed]).to eq(false)
expect(taskbar3.preferences[:tasks][0][:changed]).to be(false)
taskbar4.reload
expect(taskbar4.preferences[:tasks].count).to eq(3)
expect(taskbar4.preferences[:tasks][0][:user_id]).to eq(1)
expect(taskbar4.preferences[:tasks][0][:changed]).to eq(false)
expect(taskbar4.preferences[:tasks][0][:changed]).to be(false)
expect(taskbar4.preferences[:tasks][1][:user_id]).to eq(2)
expect(taskbar4.preferences[:tasks][1][:changed]).to eq(false)
expect(taskbar4.preferences[:tasks][1][:changed]).to be(false)
expect(taskbar4.preferences[:tasks][2][:user_id]).to eq(agent_id)
expect(taskbar4.preferences[:tasks][2][:changed]).to eq(false)
expect(taskbar4.preferences[:tasks][2][:changed]).to be(false)
UserInfo.current_user_id = 2
taskbar2.state = { article: { body: 'some body' }, ticket: {} }
@ -290,34 +290,34 @@ RSpec.describe Taskbar do
taskbar1.reload
expect(taskbar1.preferences[:tasks].count).to eq(3)
expect(taskbar1.preferences[:tasks][0][:user_id]).to eq(1)
expect(taskbar1.preferences[:tasks][0][:changed]).to eq(false)
expect(taskbar1.preferences[:tasks][0][:changed]).to be(false)
expect(taskbar1.preferences[:tasks][1][:user_id]).to eq(2)
expect(taskbar1.preferences[:tasks][1][:changed]).to eq(true)
expect(taskbar1.preferences[:tasks][1][:changed]).to be(true)
expect(taskbar1.preferences[:tasks][2][:user_id]).to eq(agent_id)
expect(taskbar1.preferences[:tasks][2][:changed]).to eq(false)
expect(taskbar1.preferences[:tasks][2][:changed]).to be(false)
taskbar2.reload
expect(taskbar2.preferences[:tasks].count).to eq(3)
expect(taskbar2.preferences[:tasks][0][:user_id]).to eq(1)
expect(taskbar2.preferences[:tasks][0][:changed]).to eq(false)
expect(taskbar2.preferences[:tasks][0][:changed]).to be(false)
expect(taskbar2.preferences[:tasks][1][:user_id]).to eq(2)
expect(taskbar2.preferences[:tasks][1][:changed]).to eq(true)
expect(taskbar2.preferences[:tasks][1][:changed]).to be(true)
expect(taskbar2.preferences[:tasks][2][:user_id]).to eq(agent_id)
expect(taskbar2.preferences[:tasks][2][:changed]).to eq(false)
expect(taskbar2.preferences[:tasks][2][:changed]).to be(false)
taskbar3.reload
expect(taskbar3.preferences[:tasks].count).to eq(1)
expect(taskbar3.preferences[:tasks][0][:user_id]).to eq(2)
expect(taskbar3.preferences[:tasks][0][:changed]).to eq(false)
expect(taskbar3.preferences[:tasks][0][:changed]).to be(false)
taskbar4.reload
expect(taskbar4.preferences[:tasks].count).to eq(3)
expect(taskbar4.preferences[:tasks][0][:user_id]).to eq(1)
expect(taskbar4.preferences[:tasks][0][:changed]).to eq(false)
expect(taskbar4.preferences[:tasks][0][:changed]).to be(false)
expect(taskbar4.preferences[:tasks][1][:user_id]).to eq(2)
expect(taskbar4.preferences[:tasks][1][:changed]).to eq(true)
expect(taskbar4.preferences[:tasks][1][:changed]).to be(true)
expect(taskbar4.preferences[:tasks][2][:user_id]).to eq(agent_id)
expect(taskbar4.preferences[:tasks][2][:changed]).to eq(false)
expect(taskbar4.preferences[:tasks][2][:changed]).to be(false)
UserInfo.current_user_id = 1
taskbar1.state = { article: { body: '' }, ticket: { state_id: 123 } }
@ -326,34 +326,34 @@ RSpec.describe Taskbar do
taskbar1.reload
expect(taskbar1.preferences[:tasks].count).to eq(3)
expect(taskbar1.preferences[:tasks][0][:user_id]).to eq(1)
expect(taskbar1.preferences[:tasks][0][:changed]).to eq(true)
expect(taskbar1.preferences[:tasks][0][:changed]).to be(true)
expect(taskbar1.preferences[:tasks][1][:user_id]).to eq(2)
expect(taskbar1.preferences[:tasks][1][:changed]).to eq(true)
expect(taskbar1.preferences[:tasks][1][:changed]).to be(true)
expect(taskbar1.preferences[:tasks][2][:user_id]).to eq(agent_id)
expect(taskbar1.preferences[:tasks][2][:changed]).to eq(false)
expect(taskbar1.preferences[:tasks][2][:changed]).to be(false)
taskbar2.reload
expect(taskbar2.preferences[:tasks].count).to eq(3)
expect(taskbar2.preferences[:tasks][0][:user_id]).to eq(1)
expect(taskbar2.preferences[:tasks][0][:changed]).to eq(true)
expect(taskbar2.preferences[:tasks][0][:changed]).to be(true)
expect(taskbar2.preferences[:tasks][1][:user_id]).to eq(2)
expect(taskbar2.preferences[:tasks][1][:changed]).to eq(true)
expect(taskbar2.preferences[:tasks][1][:changed]).to be(true)
expect(taskbar2.preferences[:tasks][2][:user_id]).to eq(agent_id)
expect(taskbar2.preferences[:tasks][2][:changed]).to eq(false)
expect(taskbar2.preferences[:tasks][2][:changed]).to be(false)
taskbar3.reload
expect(taskbar3.preferences[:tasks].count).to eq(1)
expect(taskbar3.preferences[:tasks][0][:user_id]).to eq(2)
expect(taskbar3.preferences[:tasks][0][:changed]).to eq(false)
expect(taskbar3.preferences[:tasks][0][:changed]).to be(false)
taskbar4.reload
expect(taskbar4.preferences[:tasks].count).to eq(3)
expect(taskbar4.preferences[:tasks][0][:user_id]).to eq(1)
expect(taskbar4.preferences[:tasks][0][:changed]).to eq(true)
expect(taskbar4.preferences[:tasks][0][:changed]).to be(true)
expect(taskbar4.preferences[:tasks][1][:user_id]).to eq(2)
expect(taskbar4.preferences[:tasks][1][:changed]).to eq(true)
expect(taskbar4.preferences[:tasks][1][:changed]).to be(true)
expect(taskbar4.preferences[:tasks][2][:user_id]).to eq(agent_id)
expect(taskbar4.preferences[:tasks][2][:changed]).to eq(false)
expect(taskbar4.preferences[:tasks][2][:changed]).to be(false)
taskbar1_last_contact = taskbar1.last_contact.to_s
taskbar2_last_contact = taskbar2.last_contact.to_s
@ -369,43 +369,43 @@ RSpec.describe Taskbar do
taskbar1.reload
expect(taskbar1.preferences[:tasks].count).to eq(3)
expect(taskbar1.preferences[:tasks][0][:user_id]).to eq(1)
expect(taskbar1.preferences[:tasks][0][:changed]).to eq(true)
expect(taskbar1.preferences[:tasks][0][:changed]).to be(true)
expect(taskbar1.preferences[:tasks][0][:last_contact].to_s).to eq(taskbar1_last_contact)
expect(taskbar1.preferences[:tasks][1][:user_id]).to eq(2)
expect(taskbar1.preferences[:tasks][1][:changed]).to eq(true)
expect(taskbar1.preferences[:tasks][1][:changed]).to be(true)
expect(taskbar1.preferences[:tasks][1][:last_contact].to_s).to eq(taskbar2_last_contact)
expect(taskbar1.preferences[:tasks][2][:user_id]).to eq(agent_id)
expect(taskbar1.preferences[:tasks][2][:changed]).to eq(false)
expect(taskbar1.preferences[:tasks][2][:changed]).to be(false)
expect(taskbar1.preferences[:tasks][2][:last_contact].to_s).to eq(taskbar4_last_contact)
taskbar2.reload
expect(taskbar2.preferences[:tasks].count).to eq(3)
expect(taskbar2.preferences[:tasks][0][:user_id]).to eq(1)
expect(taskbar2.preferences[:tasks][0][:changed]).to eq(true)
expect(taskbar2.preferences[:tasks][0][:changed]).to be(true)
expect(taskbar2.preferences[:tasks][0][:last_contact].to_s).to eq(taskbar1_last_contact)
expect(taskbar2.preferences[:tasks][1][:user_id]).to eq(2)
expect(taskbar2.preferences[:tasks][1][:changed]).to eq(true)
expect(taskbar2.preferences[:tasks][1][:changed]).to be(true)
expect(taskbar2.preferences[:tasks][1][:last_contact].to_s).to eq(taskbar2_last_contact)
expect(taskbar2.preferences[:tasks][2][:user_id]).to eq(agent_id)
expect(taskbar2.preferences[:tasks][2][:changed]).to eq(false)
expect(taskbar2.preferences[:tasks][2][:changed]).to be(false)
expect(taskbar2.preferences[:tasks][2][:last_contact].to_s).to eq(taskbar4_last_contact)
taskbar3.reload
expect(taskbar3.preferences[:tasks].count).to eq(1)
expect(taskbar3.preferences[:tasks][0][:user_id]).to eq(2)
expect(taskbar3.preferences[:tasks][0][:changed]).to eq(false)
expect(taskbar3.preferences[:tasks][0][:changed]).to be(false)
expect(taskbar3.preferences[:tasks][0][:last_contact].to_s).to eq(taskbar3_last_contact)
taskbar4.reload
expect(taskbar4.preferences[:tasks].count).to eq(3)
expect(taskbar4.preferences[:tasks][0][:user_id]).to eq(1)
expect(taskbar4.preferences[:tasks][0][:changed]).to eq(true)
expect(taskbar4.preferences[:tasks][0][:changed]).to be(true)
expect(taskbar4.preferences[:tasks][0][:last_contact].to_s).to eq(taskbar1_last_contact)
expect(taskbar4.preferences[:tasks][1][:user_id]).to eq(2)
expect(taskbar4.preferences[:tasks][1][:changed]).to eq(true)
expect(taskbar4.preferences[:tasks][1][:changed]).to be(true)
expect(taskbar4.preferences[:tasks][1][:last_contact].to_s).to eq(taskbar2_last_contact)
expect(taskbar4.preferences[:tasks][2][:user_id]).to eq(agent_id)
expect(taskbar4.preferences[:tasks][2][:changed]).to eq(false)
expect(taskbar4.preferences[:tasks][2][:changed]).to be(false)
expect(taskbar4.preferences[:tasks][2][:last_contact].to_s).to eq(taskbar4_last_contact)
UserInfo.current_user_id = 2
@ -416,43 +416,43 @@ RSpec.describe Taskbar do
taskbar1.reload
expect(taskbar1.preferences[:tasks].count).to eq(3)
expect(taskbar1.preferences[:tasks][0][:user_id]).to eq(1)
expect(taskbar1.preferences[:tasks][0][:changed]).to eq(true)
expect(taskbar1.preferences[:tasks][0][:changed]).to be(true)
expect(taskbar1.preferences[:tasks][0][:last_contact].to_s).to eq(taskbar1_last_contact)
expect(taskbar1.preferences[:tasks][1][:user_id]).to eq(2)
expect(taskbar1.preferences[:tasks][1][:changed]).to eq(true)
expect(taskbar1.preferences[:tasks][1][:changed]).to be(true)
expect(taskbar1.preferences[:tasks][1][:last_contact].to_s).not_to eq(taskbar2_last_contact)
expect(taskbar1.preferences[:tasks][2][:user_id]).to eq(agent_id)
expect(taskbar1.preferences[:tasks][2][:changed]).to eq(false)
expect(taskbar1.preferences[:tasks][2][:changed]).to be(false)
expect(taskbar1.preferences[:tasks][2][:last_contact].to_s).to eq(taskbar4_last_contact)
taskbar2.reload
expect(taskbar2.preferences[:tasks].count).to eq(3)
expect(taskbar2.preferences[:tasks][0][:user_id]).to eq(1)
expect(taskbar2.preferences[:tasks][0][:changed]).to eq(true)
expect(taskbar2.preferences[:tasks][0][:changed]).to be(true)
expect(taskbar2.preferences[:tasks][0][:last_contact].to_s).to eq(taskbar1_last_contact)
expect(taskbar2.preferences[:tasks][1][:user_id]).to eq(2)
expect(taskbar2.preferences[:tasks][1][:changed]).to eq(true)
expect(taskbar2.preferences[:tasks][1][:changed]).to be(true)
expect(taskbar2.preferences[:tasks][1][:last_contact].to_s).not_to eq(taskbar2_last_contact)
expect(taskbar2.preferences[:tasks][2][:user_id]).to eq(agent_id)
expect(taskbar2.preferences[:tasks][2][:changed]).to eq(false)
expect(taskbar2.preferences[:tasks][2][:changed]).to be(false)
expect(taskbar2.preferences[:tasks][2][:last_contact].to_s).to eq(taskbar4_last_contact)
taskbar3.reload
expect(taskbar3.preferences[:tasks].count).to eq(1)
expect(taskbar3.preferences[:tasks][0][:user_id]).to eq(2)
expect(taskbar3.preferences[:tasks][0][:changed]).to eq(false)
expect(taskbar3.preferences[:tasks][0][:changed]).to be(false)
expect(taskbar3.preferences[:tasks][0][:last_contact].to_s).to eq(taskbar3_last_contact)
taskbar4.reload
expect(taskbar4.preferences[:tasks].count).to eq(3)
expect(taskbar4.preferences[:tasks][0][:user_id]).to eq(1)
expect(taskbar4.preferences[:tasks][0][:changed]).to eq(true)
expect(taskbar4.preferences[:tasks][0][:changed]).to be(true)
expect(taskbar4.preferences[:tasks][0][:last_contact].to_s).to eq(taskbar1_last_contact)
expect(taskbar4.preferences[:tasks][1][:user_id]).to eq(2)
expect(taskbar4.preferences[:tasks][1][:changed]).to eq(true)
expect(taskbar4.preferences[:tasks][1][:changed]).to be(true)
expect(taskbar4.preferences[:tasks][1][:last_contact].to_s).not_to eq(taskbar2_last_contact)
expect(taskbar4.preferences[:tasks][2][:user_id]).to eq(agent_id)
expect(taskbar4.preferences[:tasks][2][:changed]).to eq(false)
expect(taskbar4.preferences[:tasks][2][:changed]).to be(false)
expect(taskbar4.preferences[:tasks][2][:last_contact].to_s).to eq(taskbar4_last_contact)
travel_back

View file

@ -77,7 +77,7 @@ RSpec.describe Ticket::Number::Date do
end
it 'returns nil' do
expect(described_class.check(check_query)).to be(nil)
expect(described_class.check(check_query)).to be_nil
end
context 'and "ticket_number_ignore_system_id" is true' do

View file

@ -109,7 +109,7 @@ RSpec.describe Ticket::Number::Increment do
end
it 'returns nil' do
expect(described_class.check(check_query)).to be(nil)
expect(described_class.check(check_query)).to be_nil
end
context 'and "ticket_number_ignore_system_id" is true' do

View file

@ -12,7 +12,7 @@ RSpec.describe Ticket::Number do
it 'defers to subclass specified in "ticket_number" setting' do
expect(Ticket::Number::Foo).to receive(:generate)
expect(described_class.generate).to be(nil)
expect(described_class.generate).to be_nil
end
end
@ -21,7 +21,7 @@ RSpec.describe Ticket::Number do
it 'defers to subclass specified in "ticket_number" setting' do
expect(Ticket::Number::Foo).to receive(:check).with('foo')
expect(described_class.check('foo')).to be(nil)
expect(described_class.check('foo')).to be_nil
end
end

View file

@ -830,7 +830,7 @@ RSpec.describe Ticket, type: :model do
let(:customer) { create(:customer) }
it 'send trigger base notification' do
expect(ticket.send(:trigger_based_notification?, customer)).to eq(true)
expect(ticket.send(:trigger_based_notification?, customer)).to be(true)
end
end
@ -846,7 +846,7 @@ RSpec.describe Ticket, type: :model do
end
it 'send no trigger base notification' do
expect(ticket.send(:trigger_based_notification?, customer)).to eq(false)
expect(ticket.send(:trigger_based_notification?, customer)).to be(false)
end
context 'with failed date 61 days ago' do
@ -854,7 +854,7 @@ RSpec.describe Ticket, type: :model do
let(:failed_date) { 61.days.ago }
it 'send trigger base notification' do
expect(ticket.send(:trigger_based_notification?, customer)).to eq(true)
expect(ticket.send(:trigger_based_notification?, customer)).to be(true)
end
end
end
@ -1179,7 +1179,7 @@ RSpec.describe Ticket, type: :model do
context 'with no SLAs in the system' do
it 'defaults to nil' do
expect(ticket.escalation_at).to be(nil)
expect(ticket.escalation_at).to be_nil
end
end
@ -1390,7 +1390,7 @@ RSpec.describe Ticket, type: :model do
context 'with no SLAs in the system' do
it 'defaults to nil' do
expect(ticket.first_response_escalation_at).to be(nil)
expect(ticket.first_response_escalation_at).to be_nil
end
end
@ -1422,7 +1422,7 @@ RSpec.describe Ticket, type: :model do
context 'with no SLAs in the system' do
it 'defaults to nil' do
expect(ticket.update_escalation_at).to be(nil)
expect(ticket.update_escalation_at).to be_nil
end
end
@ -1462,7 +1462,7 @@ RSpec.describe Ticket, type: :model do
context 'with no SLAs in the system' do
it 'defaults to nil' do
expect(ticket.close_escalation_at).to be(nil)
expect(ticket.close_escalation_at).to be_nil
end
end
@ -2179,7 +2179,7 @@ RSpec.describe Ticket, type: :model do
let(:current_payload_size) { 3.megabyte }
it 'return false' do
expect(ticket.send(:search_index_attribute_lookup_oversized?, current_payload_size)).to eq false
expect(ticket.send(:search_index_attribute_lookup_oversized?, current_payload_size)).to be false
end
end
@ -2187,7 +2187,7 @@ RSpec.describe Ticket, type: :model do
let(:current_payload_size) { 350.megabyte }
it 'return true' do
expect(ticket.send(:search_index_attribute_lookup_oversized?, current_payload_size)).to eq true
expect(ticket.send(:search_index_attribute_lookup_oversized?, current_payload_size)).to be true
end
end
end
@ -2207,7 +2207,7 @@ RSpec.describe Ticket, type: :model do
let(:current_payload_size) { 200.megabyte }
it 'return false' do
expect(ticket.send(:search_index_attribute_lookup_file_oversized?, store, current_payload_size)).to eq false
expect(ticket.send(:search_index_attribute_lookup_file_oversized?, store, current_payload_size)).to be false
end
end
@ -2215,7 +2215,7 @@ RSpec.describe Ticket, type: :model do
let(:current_payload_size) { 299.megabyte }
it 'return true' do
expect(ticket.send(:search_index_attribute_lookup_file_oversized?, store, current_payload_size)).to eq true
expect(ticket.send(:search_index_attribute_lookup_file_oversized?, store, current_payload_size)).to be true
end
end
end
@ -2233,7 +2233,7 @@ RSpec.describe Ticket, type: :model do
end
it 'return false' do
expect(ticket.send(:search_index_attribute_lookup_file_ignored?, store_with_indexable_extention)).to eq false
expect(ticket.send(:search_index_attribute_lookup_file_ignored?, store_with_indexable_extention)).to be false
end
end
@ -2249,7 +2249,7 @@ RSpec.describe Ticket, type: :model do
end
it 'return true' do
expect(ticket.send(:search_index_attribute_lookup_file_ignored?, store_without_indexable_extention)).to eq true
expect(ticket.send(:search_index_attribute_lookup_file_ignored?, store_without_indexable_extention)).to be true
end
end
end

View file

@ -14,13 +14,13 @@ RSpec.describe Token, type: :model do
context 'with invalid name' do
it 'returns nil' do
expect(described_class.check(action: token.action, name: '1NV4L1D')).to be(nil)
expect(described_class.check(action: token.action, name: '1NV4L1D')).to be_nil
end
end
context 'with invalid action' do
it 'returns nil' do
expect(described_class.check(action: 'PasswordReset_NotExisting', name: token.name)).to be(nil)
expect(described_class.check(action: 'PasswordReset_NotExisting', name: token.name)).to be_nil
end
end
@ -66,7 +66,7 @@ RSpec.describe Token, type: :model do
let(:created_at) { 1.day.ago }
it 'returns nil' do
expect(described_class.check(action: token.action, name: token.name)).to be(nil)
expect(described_class.check(action: token.action, name: token.name)).to be_nil
end
it 'deletes the token' do
@ -99,25 +99,25 @@ RSpec.describe Token, type: :model do
context 'with the parent of a permission shared by both token.user and token.preferences' do
it 'returns nil' do
expect(described_class.check(action: token.action, name: token.name, permission: 'ticket')).to be(nil)
expect(described_class.check(action: token.action, name: token.name, permission: 'ticket')).to be_nil
end
end
context 'with a permission in token.preferences, but not on token.user' do
it 'returns nil' do
expect(described_class.check(action: token.action, name: token.name, permission: 'admin')).to be(nil)
expect(described_class.check(action: token.action, name: token.name, permission: 'admin')).to be_nil
end
end
context 'with a permission not in token.preferences, but on token.user' do
it 'returns nil' do
expect(described_class.check(action: token.action, name: token.name, permission: 'cti.agent')).to be(nil)
expect(described_class.check(action: token.action, name: token.name, permission: 'cti.agent')).to be_nil
end
end
context 'with non-existent permission' do
it 'returns nil' do
expect(described_class.check(action: token.action, name: token.name, permission: 'foo')).to be(nil)
expect(described_class.check(action: token.action, name: token.name, permission: 'foo')).to be_nil
end
end
@ -264,7 +264,7 @@ RSpec.describe Token, type: :model do
subject(:token) { described_class.create(action: 'foo', user_id: User.first.id) }
it 'defaults to nil' do
expect(token.persistent).to be(nil)
expect(token.persistent).to be_nil
end
end
end

View file

@ -234,7 +234,7 @@ RSpec.describe UserDevice, type: :model do
it 'returns true' do
expect(user_device.notification_send('user_device_new_location'))
.to eq(true)
.to be(true)
end
end
@ -243,7 +243,7 @@ RSpec.describe UserDevice, type: :model do
it 'returns false' do
expect(user_device.notification_send('user_device_new_location'))
.to eq(false)
.to be(false)
end
end
end

View file

@ -43,7 +43,7 @@ RSpec.describe User, type: :model do
end
it 'returns nil for empty username' do
expect(described_class.identify('')).to eq(nil)
expect(described_class.identify('')).to be_nil
end
end
end
@ -176,7 +176,7 @@ RSpec.describe User, type: :model do
context 'when user has no designated substitute' do
it 'returns nil' do
expect(user.out_of_office_agent).to be(nil)
expect(user.out_of_office_agent).to be_nil
end
end
@ -195,7 +195,7 @@ RSpec.describe User, type: :model do
let(:out_of_office) { false }
it 'returns nil' do
expect(user.out_of_office_agent).to be(nil)
expect(user.out_of_office_agent).to be_nil
end
end
@ -410,7 +410,7 @@ RSpec.describe User, type: :model do
context 'with an invalid token' do
it 'returns nil' do
expect(described_class.by_reset_token('not-existing')).to be(nil)
expect(described_class.by_reset_token('not-existing')).to be_nil
end
end
end
@ -776,7 +776,7 @@ RSpec.describe User, type: :model do
let(:another_user) { create(:user, password: '') }
it 'sets password to nil' do
expect(another_user.password).to eq(nil)
expect(another_user.password).to be_nil
end
end
@ -784,7 +784,7 @@ RSpec.describe User, type: :model do
let(:another_user) { create(:user, password: nil) }
it 'sets password to nil' do
expect(another_user.password).to eq(nil)
expect(another_user.password).to be_nil
end
end
end
@ -930,17 +930,17 @@ RSpec.describe User, type: :model do
let(:escaped) { Regexp.escape(value) }
it 'valid create' do
expect(create(:user, image_source: 'https://zammad.org/avatar.png').image_source).not_to eq(nil)
expect(create(:user, image_source: 'https://zammad.org/avatar.png').image_source).not_to be_nil
end
it 'removes invalid image source of create' do
expect(create(:user, image_source: value).image_source).to eq(nil)
expect(create(:user, image_source: value).image_source).to be_nil
end
it 'removes invalid image source of update' do
user = create(:user)
user.update!(image_source: value)
expect(user.image_source).to eq(nil)
expect(user.image_source).to be_nil
end
end
end

View file

@ -528,7 +528,7 @@ RSpec.describe 'External Credentials', type: :request do
it 'clears the :request_token session variable' do
send(*endpoint, as: :json, params: params, headers: headers)
expect(session[:request_token]).to be(nil)
expect(session[:request_token]).to be_nil
end
it 'subscribes to webhooks' do

View file

@ -34,7 +34,7 @@ RSpec.describe 'Form', type: :request, searchindex: true do
expect(response).to have_http_status(:ok)
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['enabled']).to eq(true)
expect(json_response['enabled']).to be(true)
expect(json_response['endpoint']).to eq('http://zammad.example.com/api/v1/form_submit')
expect(json_response['token']).to be_truthy
token = json_response['token']
@ -99,7 +99,7 @@ RSpec.describe 'Form', type: :request, searchindex: true do
expect(response).to have_http_status(:ok)
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['enabled']).to eq(true)
expect(json_response['enabled']).to be(true)
expect(json_response['endpoint']).to eq('http://zammad.example.com/api/v1/form_submit')
expect(json_response['token']).to be_truthy
token = json_response['token']
@ -147,7 +147,7 @@ RSpec.describe 'Form', type: :request, searchindex: true do
expect(response).to have_http_status(:ok)
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['enabled']).to eq(true)
expect(json_response['enabled']).to be(true)
expect(json_response['endpoint']).to eq('http://zammad.example.com/api/v1/form_submit')
expect(json_response['token']).to be_truthy
token = json_response['token']

View file

@ -311,7 +311,7 @@ RSpec.describe 'Integration Check MK', type: :request do
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['result']).to eq('no open tickets found, ignore action')
expect(json_response['ticket_ids']).to eq(nil)
expect(json_response['ticket_ids']).to be_nil
ticket.reload
expect(ticket.state.name).to eq('new')
@ -500,7 +500,7 @@ RSpec.describe 'Integration Check MK', type: :request do
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['result']).to eq('no open tickets found, ignore action')
expect(json_response['ticket_ids']).to eq(nil)
expect(json_response['ticket_ids']).to be_nil
ticket.reload
expect(ticket.state.name).to eq('new')

View file

@ -201,7 +201,7 @@ RSpec.describe 'Integration CTI', type: :request do
expect(log.comment).to be_nil
expect(log.queue).to eq('4930777000000')
expect(log.state).to eq('newCall')
expect(log.done).to eq(true)
expect(log.done).to be(true)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_nil
expect(log.end_at).to be_nil
@ -228,7 +228,7 @@ RSpec.describe 'Integration CTI', type: :request do
expect(log.comment).to eq('cancel')
expect(log.queue).to eq('4930777000000')
expect(log.state).to eq('hangup')
expect(log.done).to eq(true)
expect(log.done).to be(true)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_nil
expect(log.end_at).to be_truthy
@ -255,7 +255,7 @@ RSpec.describe 'Integration CTI', type: :request do
expect(log.comment).to be_nil
expect(log.queue).to eq('4930777000000')
expect(log.state).to eq('newCall')
expect(log.done).to eq(true)
expect(log.done).to be(true)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_nil
expect(log.end_at).to be_nil
@ -283,7 +283,7 @@ RSpec.describe 'Integration CTI', type: :request do
expect(log.comment).to be_nil
expect(log.queue).to eq('4930777000000')
expect(log.state).to eq('answer')
expect(log.done).to eq(true)
expect(log.done).to be(true)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_truthy
expect(log.end_at).to be_nil
@ -312,7 +312,7 @@ RSpec.describe 'Integration CTI', type: :request do
expect(log.comment).to eq('normalClearing')
expect(log.queue).to eq('4930777000000')
expect(log.state).to eq('hangup')
expect(log.done).to eq(true)
expect(log.done).to be(true)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_truthy
expect(log.end_at).to be_truthy
@ -341,7 +341,7 @@ RSpec.describe 'Integration CTI', type: :request do
expect(log.comment).to be_nil
expect(log.queue).to eq('4930600000000')
expect(log.state).to eq('newCall')
expect(log.done).to eq(false)
expect(log.done).to be(false)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_nil
expect(log.end_at).to be_nil
@ -369,7 +369,7 @@ RSpec.describe 'Integration CTI', type: :request do
expect(log.comment).to be_nil
expect(log.queue).to eq('4930600000000')
expect(log.state).to eq('answer')
expect(log.done).to eq(true)
expect(log.done).to be(true)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_truthy
expect(log.end_at).to be_nil
@ -398,7 +398,7 @@ RSpec.describe 'Integration CTI', type: :request do
expect(log.comment).to eq('normalClearing')
expect(log.queue).to eq('4930600000000')
expect(log.state).to eq('hangup')
expect(log.done).to eq(true)
expect(log.done).to be(true)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_truthy
expect(log.end_at).to be_truthy
@ -439,7 +439,7 @@ RSpec.describe 'Integration CTI', type: :request do
expect(log.comment).to be_nil
expect(log.queue).to eq('4930600000000')
expect(log.state).to eq('newCall')
expect(log.done).to eq(false)
expect(log.done).to be(false)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_nil
expect(log.end_at).to be_nil
@ -468,7 +468,7 @@ RSpec.describe 'Integration CTI', type: :request do
expect(log.comment).to be_nil
expect(log.queue).to eq('4930600000000')
expect(log.state).to eq('answer')
expect(log.done).to eq(true)
expect(log.done).to be(true)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_truthy
expect(log.end_at).to be_nil
@ -497,7 +497,7 @@ RSpec.describe 'Integration CTI', type: :request do
expect(log.comment).to eq('normalClearing')
expect(log.queue).to eq('4930600000000')
expect(log.state).to eq('hangup')
expect(log.done).to eq(false)
expect(log.done).to be(false)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_truthy
expect(log.end_at).to be_truthy
@ -526,7 +526,7 @@ RSpec.describe 'Integration CTI', type: :request do
expect(log.comment).to be_nil
expect(log.queue).to eq('4930600000000')
expect(log.state).to eq('newCall')
expect(log.done).to eq(false)
expect(log.done).to be(false)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_nil
expect(log.end_at).to be_nil
@ -555,7 +555,7 @@ RSpec.describe 'Integration CTI', type: :request do
expect(log.comment).to eq('normalClearing')
expect(log.queue).to eq('4930600000000')
expect(log.state).to eq('hangup')
expect(log.done).to eq(false)
expect(log.done).to be(false)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_nil
expect(log.end_at).to be_truthy
@ -586,7 +586,7 @@ RSpec.describe 'Integration CTI', type: :request do
expect(log.comment).to be_nil
expect(log.queue).to eq('4930600000000')
expect(log.state).to eq('newCall')
expect(log.done).to eq(false)
expect(log.done).to be(false)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_nil
expect(log.end_at).to be_nil
@ -618,7 +618,7 @@ RSpec.describe 'Integration CTI', type: :request do
expect(log.comment).to be_nil
expect(log.queue).to eq('some_queue_name')
expect(log.state).to eq('newCall')
expect(log.done).to eq(false)
expect(log.done).to be(false)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_nil
expect(log.end_at).to be_nil
@ -697,7 +697,7 @@ RSpec.describe 'Integration CTI', type: :request do
get '/api/v1/cti/log', as: :json
expect(response).to have_http_status(:ok)
expect(json_response.dig('assets', 'User')).not_to be(nil)
expect(json_response.dig('assets', 'User')).not_to be_nil
expect(json_response['list'].map { |x| x['call_id'] }).to match_array(%w[1234567890-1 1234567890-2])
end
@ -771,7 +771,7 @@ RSpec.describe 'Integration CTI', type: :request do
expect(log.comment).to be_nil
expect(log.queue).to eq('some_queue_name')
expect(log.state).to eq('newCall')
expect(log.done).to eq(false)
expect(log.done).to be(false)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_nil
expect(log.end_at).to be_nil
@ -801,7 +801,7 @@ RSpec.describe 'Integration CTI', type: :request do
expect(log.comment).to be_nil
expect(log.queue).to eq('some_queue_name')
expect(log.state).to eq('newCall')
expect(log.done).to eq(false)
expect(log.done).to be(false)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_nil
expect(log.end_at).to be_nil
@ -814,7 +814,7 @@ RSpec.describe 'Integration CTI', type: :request do
cti_log1 = create(:cti_log)
log = Cti::Log.find(cti_log1.id)
expect(log.done).to eq(false)
expect(log.done).to be(false)
authenticated_as(agent)
post "/api/v1/cti/done/#{cti_log1.id}", params: {
@ -823,7 +823,7 @@ RSpec.describe 'Integration CTI', type: :request do
expect(response).to have_http_status(:ok)
log = Cti::Log.find(cti_log1.id)
expect(log.done).to eq(true)
expect(log.done).to be(true)
end
it 'flags all caller_logs as done via done_bulk' do
@ -832,7 +832,7 @@ RSpec.describe 'Integration CTI', type: :request do
cti_log2 = create(:cti_log)
log = Cti::Log.find(cti_log1.id)
expect(log.done).to eq(false)
expect(log.done).to be(false)
authenticated_as(agent)
post '/api/v1/cti/done/bulk', params: {
@ -841,10 +841,10 @@ RSpec.describe 'Integration CTI', type: :request do
expect(response).to have_http_status(:ok)
log1 = Cti::Log.find(cti_log1.id)
expect(log1.done).to eq(true)
expect(log1.done).to be(true)
log2 = Cti::Log.find(cti_log2.id)
expect(log2.done).to eq(true)
expect(log2.done).to be(true)
end
end
end

View file

@ -131,7 +131,7 @@ RSpec.describe 'Monitoring', type: :request do
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['error']).to be_falsey
expect(json_response['issues']).to eq([])
expect(json_response['healthy']).to eq(true)
expect(json_response['healthy']).to be(true)
expect(json_response['message']).to eq('success')
# status
@ -240,7 +240,7 @@ RSpec.describe 'Monitoring', type: :request do
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['error']).to be_falsey
expect(json_response['healthy']).to eq(true)
expect(json_response['healthy']).to be(true)
expect(json_response['message']).to eq('success')
# status
@ -346,7 +346,7 @@ RSpec.describe 'Monitoring', type: :request do
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['error']).to be_falsey
expect(json_response['healthy']).to eq(true)
expect(json_response['healthy']).to be(true)
expect(json_response['message']).to eq('success')
# status
@ -388,7 +388,7 @@ RSpec.describe 'Monitoring', type: :request do
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['message']).to be_truthy
expect(json_response['issues']).to be_truthy
expect(json_response['healthy']).to eq(false)
expect(json_response['healthy']).to be(false)
expect(json_response['message']).to eq('Channel: Email::Notification out ')
# health_check - scheduler may not run
@ -403,7 +403,7 @@ RSpec.describe 'Monitoring', type: :request do
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['message']).to be_truthy
expect(json_response['issues']).to be_truthy
expect(json_response['healthy']).to eq(false)
expect(json_response['healthy']).to be(false)
expect(json_response['message']).to eq("Channel: Email::Notification out ;scheduler may not run (last execution of #{scheduler.method} 10 minutes over) - please contact your system administrator")
# health_check - scheduler may not run
@ -418,7 +418,7 @@ RSpec.describe 'Monitoring', type: :request do
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['message']).to be_truthy
expect(json_response['issues']).to be_truthy
expect(json_response['healthy']).to eq(false)
expect(json_response['healthy']).to be(false)
expect(json_response['message']).to eq("Channel: Email::Notification out ;scheduler may not run (last execution of #{scheduler.method} about 24 hours over) - please contact your system administrator")
# health_check - scheduler job count
@ -438,7 +438,7 @@ RSpec.describe 'Monitoring', type: :request do
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['message']).to be_truthy
expect(json_response['issues']).to be_truthy
expect(json_response['healthy']).to eq(false)
expect(json_response['healthy']).to be(false)
expect(json_response['message']).to eq('Channel: Email::Notification out ')
travel 20.minutes
@ -453,7 +453,7 @@ RSpec.describe 'Monitoring', type: :request do
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['message']).to be_truthy
expect(json_response['issues']).to be_truthy
expect(json_response['healthy']).to eq(false)
expect(json_response['healthy']).to be(false)
expect(json_response['message']).to eq("Channel: Email::Notification out ;#{total_jobs} background jobs in queue")
Delayed::Job.delete_all
@ -470,7 +470,7 @@ RSpec.describe 'Monitoring', type: :request do
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['message']).to be_truthy
expect(json_response['issues']).to be_truthy
expect(json_response['healthy']).to eq(false)
expect(json_response['healthy']).to be(false)
expect(json_response['message']).to eq('Channel: Email::Notification out ;unprocessable mails: 1')
# health_check - ldap
@ -490,7 +490,7 @@ RSpec.describe 'Monitoring', type: :request do
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['message']).to be_truthy
expect(json_response['issues']).to be_truthy
expect(json_response['healthy']).to eq(false)
expect(json_response['healthy']).to be(false)
expect(json_response['message']).to eq("Channel: Email::Notification out ;unprocessable mails: 1;Failed to run import backend 'Import::Ldap'. Cause: Some bad error")
stuck_updated_at_timestamp = 15.minutes.ago
@ -508,7 +508,7 @@ RSpec.describe 'Monitoring', type: :request do
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['message']).to be_truthy
expect(json_response['issues']).to be_truthy
expect(json_response['healthy']).to eq(false)
expect(json_response['healthy']).to be(false)
expect(json_response['message']).to eq("Channel: Email::Notification out ;unprocessable mails: 1;Failed to run import backend 'Import::Ldap'. Cause: Some bad error;Stuck import backend 'Import::Ldap' detected. Last update: #{stuck_updated_at_timestamp}")
privacy_stuck_updated_at_timestamp = 30.minutes.ago
@ -522,7 +522,7 @@ RSpec.describe 'Monitoring', type: :request do
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['message']).to be_truthy
expect(json_response['issues']).to be_truthy
expect(json_response['healthy']).to eq(false)
expect(json_response['healthy']).to be(false)
expect(json_response['message']).to eq("Channel: Email::Notification out ;unprocessable mails: 1;Failed to run import backend 'Import::Ldap'. Cause: Some bad error;Stuck import backend 'Import::Ldap' detected. Last update: #{stuck_updated_at_timestamp};Stuck data privacy task (ID #{task.id}) detected. Last update: #{privacy_stuck_updated_at_timestamp}")
Setting.set('ldap_integration', false)
@ -611,7 +611,7 @@ RSpec.describe 'Monitoring', type: :request do
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['message']).to be_truthy
expect(json_response['issues']).to be_truthy
expect(json_response['healthy']).to eq(false)
expect(json_response['healthy']).to be(false)
expect(json_response['message']).to eq("Failed to run background job #1 'SearchIndexAssociationsJob' 1 time(s) with 1 attempt(s).")
# add another job
@ -625,7 +625,7 @@ RSpec.describe 'Monitoring', type: :request do
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['message']).to be_truthy
expect(json_response['issues']).to be_truthy
expect(json_response['healthy']).to eq(false)
expect(json_response['healthy']).to be(false)
expect(json_response['message']).to eq("Failed to run background job #1 'SearchIndexAssociationsJob' 1 time(s) with 1 attempt(s).;Failed to run background job #2 'SearchIndexJob' 1 time(s) with 10 attempt(s).")
# add another job
@ -645,7 +645,7 @@ RSpec.describe 'Monitoring', type: :request do
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['message']).to be_truthy
expect(json_response['issues']).to be_truthy
expect(json_response['healthy']).to eq(false)
expect(json_response['healthy']).to be(false)
expect(json_response['message']).to eq("Failed to run background job #1 'Object' 1 time(s) with 5 attempt(s).;Failed to run background job #2 'SearchIndexAssociationsJob' 1 time(s) with 1 attempt(s).;Failed to run background job #3 'SearchIndexJob' 1 time(s) with 10 attempt(s).")
# reset settings
@ -664,7 +664,7 @@ RSpec.describe 'Monitoring', type: :request do
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['message']).to be_truthy
expect(json_response['issues']).to be_truthy
expect(json_response['healthy']).to eq(false)
expect(json_response['healthy']).to be(false)
expect(json_response['message']).to eq("13 failing background jobs;Failed to run background job #1 'Object' 8 time(s) with 40 attempt(s).;Failed to run background job #2 'SearchIndexAssociationsJob' 1 time(s) with 1 attempt(s).;Failed to run background job #3 'SearchIndexJob' 1 time(s) with 10 attempt(s).")
# cleanup
@ -679,8 +679,8 @@ RSpec.describe 'Monitoring', type: :request do
expect(response).to have_http_status(:ok)
expect(json_response).to be_a_kind_of(Hash)
expect(json_response.key?('state')).to eq(false)
expect(json_response.key?('message')).to eq(false)
expect(json_response.key?('state')).to be(false)
expect(json_response.key?('message')).to be(false)
expect(json_response['count']).to eq(0)
Ticket.destroy_all
@ -710,7 +710,7 @@ RSpec.describe 'Monitoring', type: :request do
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['state']).to eq('ok')
expect(json_response.key?('message')).to eq(false)
expect(json_response.key?('message')).to be(false)
expect(json_response['count']).to eq(6)
(1..6).each do |i|
@ -744,15 +744,15 @@ RSpec.describe 'Monitoring', type: :request do
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['state']).to eq('ok')
expect(json_response.key?('message')).to eq(false)
expect(json_response.key?('message')).to be(false)
expect(json_response['count']).to eq(22)
get "/api/v1/monitoring/amount_check?token=#{token}&periode=1h", params: {}, as: :json
expect(response).to have_http_status(:ok)
expect(json_response).to be_a_kind_of(Hash)
expect(json_response.key?('state')).to eq(false)
expect(json_response.key?('message')).to eq(false)
expect(json_response.key?('state')).to be(false)
expect(json_response.key?('message')).to be(false)
expect(json_response['count']).to eq(22)
travel 2.hours
@ -762,15 +762,15 @@ RSpec.describe 'Monitoring', type: :request do
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['state']).to eq('ok')
expect(json_response.key?('message')).to eq(false)
expect(json_response.key?('message')).to be(false)
expect(json_response['count']).to eq(0)
get "/api/v1/monitoring/amount_check?token=#{token}&periode=1h", params: {}, as: :json
expect(response).to have_http_status(:ok)
expect(json_response).to be_a_kind_of(Hash)
expect(json_response.key?('state')).to eq(false)
expect(json_response.key?('message')).to eq(false)
expect(json_response.key?('state')).to be(false)
expect(json_response.key?('message')).to be(false)
expect(json_response['count']).to eq(0)
end
end

View file

@ -53,7 +53,7 @@ RSpec.describe 'ObjectManager Attributes', type: :request do
expect(response).to have_http_status(:created)
expect(json_response).to be_truthy
expect(json_response['data_option']['null']).to be_truthy
expect(json_response['data_option']['null']).to eq(true)
expect(json_response['data_option']['null']).to be(true)
expect(json_response['name']).to eq('test1')
end
@ -99,7 +99,7 @@ RSpec.describe 'ObjectManager Attributes', type: :request do
expect(response).to have_http_status(:created)
expect(json_response).to be_truthy
expect(json_response['data_option']['null']).to be_truthy
expect(json_response['data_option']['null']).to eq(true)
expect(json_response['data_option']['null']).to be(true)
expect(json_response['name']).to eq('test2')
end
@ -109,7 +109,7 @@ RSpec.describe 'ObjectManager Attributes', type: :request do
object = create(:object_manager_attribute_text)
migration = ObjectManager::Attribute.migration_execute
expect(migration).to eq(true)
expect(migration).to be(true)
authenticated_as(admin)
post "/api/v1/object_manager_attributes/#{object.id}", params: {}, as: :json
@ -202,7 +202,7 @@ RSpec.describe 'ObjectManager Attributes', type: :request do
expect(response).to have_http_status(:created)
expect(json_response).to be_truthy
expect(json_response['data_option']['null']).to be_truthy
expect(json_response['data_option']['null']).to eq(true)
expect(json_response['data_option']['null']).to be(true)
expect(json_response['name']).to eq('bool2')
end
@ -261,7 +261,7 @@ RSpec.describe 'ObjectManager Attributes', type: :request do
expect(response).to have_http_status(:created)
expect(json_response).to be_truthy
expect(json_response['data_option']['null']).to be_truthy
expect(json_response['data_option']['null']).to eq(true)
expect(json_response['data_option']['null']).to be(true)
expect(json_response['name']).to eq('test5')
end
@ -270,7 +270,7 @@ RSpec.describe 'ObjectManager Attributes', type: :request do
object = create(:object_manager_attribute_text, object_name: 'User')
migration = ObjectManager::Attribute.migration_execute
expect(migration).to eq(true)
expect(migration).to be(true)
post "/api/v1/object_manager_attributes/#{object.id}", params: {}, as: :json
@ -372,13 +372,13 @@ RSpec.describe 'ObjectManager Attributes', type: :request do
post '/api/v1/object_manager_attributes', params: params, as: :json
migration = ObjectManager::Attribute.migration_execute
expect(migration).to eq(true)
expect(migration).to be(true)
expect(response).to have_http_status(:created) # created
expect(json_response).to be_truthy
expect(json_response['data_option']['default']).to be_truthy
expect(json_response['data_option']['default']).to eq(true)
expect(json_response['data_option']['default']).to be(true)
expect(json_response['data_type']).to eq('boolean')
end
@ -422,13 +422,13 @@ RSpec.describe 'ObjectManager Attributes', type: :request do
post '/api/v1/object_manager_attributes', params: params, as: :json
migration = ObjectManager::Attribute.migration_execute
expect(migration).to eq(true)
expect(migration).to be(true)
expect(response).to have_http_status(:created) # created
expect(json_response).to be_truthy
expect(json_response['data_option']['default']).to be_falsey
expect(json_response['data_option']['default']).to eq(false)
expect(json_response['data_option']['default']).to be(false)
expect(json_response['data_type']).to eq('boolean')
end
@ -477,7 +477,7 @@ RSpec.describe 'ObjectManager Attributes', type: :request do
post '/api/v1/object_manager_attributes', params: params, as: :json
migration = ObjectManager::Attribute.migration_execute
expect(migration).to eq(true)
expect(migration).to be(true)
# 2. create an overview that uses the attribute
params = {
@ -572,7 +572,7 @@ RSpec.describe 'ObjectManager Attributes', type: :request do
post '/api/v1/object_manager_attributes', params: params, as: :json
migration = ObjectManager::Attribute.migration_execute
expect(migration).to eq(true)
expect(migration).to be(true)
# 2. create an trigger that uses the attribute
params = {
@ -658,7 +658,7 @@ RSpec.describe 'ObjectManager Attributes', type: :request do
post '/api/v1/object_manager_attributes', params: params, as: :json
migration = ObjectManager::Attribute.migration_execute
expect(migration).to eq(true)
expect(migration).to be(true)
# 2. create a scheduler that uses the attribute
params = {
@ -829,7 +829,7 @@ RSpec.describe 'ObjectManager Attributes', type: :request do
post '/api/v1/object_manager_attributes', params: params, as: :json
migration = ObjectManager::Attribute.migration_execute
expect(migration).to eq(true)
expect(migration).to be(true)
# 2. create an overview that uses the attribute
params = {
@ -888,7 +888,7 @@ RSpec.describe 'ObjectManager Attributes', type: :request do
expect(response.body).to include('cannot be deleted!')
migration = ObjectManager::Attribute.migration_execute
expect(migration).to eq(true)
expect(migration).to be(true)
end
it 'does verify if attribute type can not be changed (07)', db_strategy: :reset do
@ -935,11 +935,11 @@ RSpec.describe 'ObjectManager Attributes', type: :request do
expect(json_response).to be_truthy
expect(json_response['data_option']['default']).to be_falsey
expect(json_response['data_option']['default']).to eq(false)
expect(json_response['data_option']['default']).to be(false)
expect(json_response['data_type']).to eq('boolean')
migration = ObjectManager::Attribute.migration_execute
expect(migration).to eq(true)
expect(migration).to be(true)
params['data_type'] = 'input'
params['data_option'] = {
@ -1000,7 +1000,7 @@ RSpec.describe 'ObjectManager Attributes', type: :request do
expect(json_response['data_type']).to eq('input')
migration = ObjectManager::Attribute.migration_execute
expect(migration).to eq(true)
expect(migration).to be(true)
params['data_type'] = 'select'
params['data_option'] = {

View file

@ -189,11 +189,11 @@ RSpec.describe 'Integration Placetel', type: :request do
expect(log.from).to eq('4930777000000')
expect(log.to).to eq('01114100300')
expect(log.direction).to eq('out')
expect(log.from_comment).to eq(nil)
expect(log.from_comment).to be_nil
expect(log.to_comment).to eq('CallerId Customer1')
expect(log.comment).to be_nil
expect(log.state).to eq('newCall')
expect(log.done).to eq(true)
expect(log.done).to be(true)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_nil
expect(log.end_at).to be_nil
@ -211,11 +211,11 @@ RSpec.describe 'Integration Placetel', type: :request do
expect(log.from).to eq('4930777000000')
expect(log.to).to eq('01114100300')
expect(log.direction).to eq('out')
expect(log.from_comment).to eq(nil)
expect(log.from_comment).to be_nil
expect(log.to_comment).to eq('CallerId Customer1')
expect(log.comment).to eq('cancel')
expect(log.state).to eq('hangup')
expect(log.done).to eq(true)
expect(log.done).to be(true)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_nil
expect(log.end_at).to be_truthy
@ -233,11 +233,11 @@ RSpec.describe 'Integration Placetel', type: :request do
expect(log.from).to eq('4930777000000')
expect(log.to).to eq('01114100300')
expect(log.direction).to eq('out')
expect(log.from_comment).to eq(nil)
expect(log.from_comment).to be_nil
expect(log.to_comment).to eq('CallerId Customer1')
expect(log.comment).to be_nil
expect(log.state).to eq('newCall')
expect(log.done).to eq(true)
expect(log.done).to be(true)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_nil
expect(log.end_at).to be_nil
@ -255,11 +255,11 @@ RSpec.describe 'Integration Placetel', type: :request do
expect(log.from).to eq('4930777000000')
expect(log.to).to eq('01114100300')
expect(log.direction).to eq('out')
expect(log.from_comment).to eq(nil)
expect(log.from_comment).to be_nil
expect(log.to_comment).to eq('CallerId Customer1')
expect(log.comment).to be_nil
expect(log.state).to eq('answer')
expect(log.done).to eq(true)
expect(log.done).to be(true)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_truthy
expect(log.end_at).to be_nil
@ -277,11 +277,11 @@ RSpec.describe 'Integration Placetel', type: :request do
expect(log.from).to eq('4930777000000')
expect(log.to).to eq('01114100300')
expect(log.direction).to eq('out')
expect(log.from_comment).to eq(nil)
expect(log.from_comment).to be_nil
expect(log.to_comment).to eq('CallerId Customer1')
expect(log.comment).to eq('normalClearing')
expect(log.state).to eq('hangup')
expect(log.done).to eq(true)
expect(log.done).to be(true)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_truthy
expect(log.end_at).to be_truthy
@ -299,11 +299,11 @@ RSpec.describe 'Integration Placetel', type: :request do
expect(log.to).to eq('030600000000')
expect(log.from).to eq('01114100300')
expect(log.direction).to eq('in')
expect(log.to_comment).to eq(nil)
expect(log.to_comment).to be_nil
expect(log.from_comment).to eq('CallerId Customer1')
expect(log.comment).to be_nil
expect(log.state).to eq('newCall')
expect(log.done).to eq(false)
expect(log.done).to be(false)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_nil
expect(log.end_at).to be_nil
@ -321,11 +321,11 @@ RSpec.describe 'Integration Placetel', type: :request do
expect(log.to).to eq('030600000000')
expect(log.from).to eq('01114100300')
expect(log.direction).to eq('in')
expect(log.to_comment).to eq(nil)
expect(log.to_comment).to be_nil
expect(log.from_comment).to eq('CallerId Customer1')
expect(log.comment).to be_nil
expect(log.state).to eq('answer')
expect(log.done).to eq(true)
expect(log.done).to be(true)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_truthy
expect(log.end_at).to be_nil
@ -343,11 +343,11 @@ RSpec.describe 'Integration Placetel', type: :request do
expect(log.to).to eq('030600000000')
expect(log.from).to eq('01114100300')
expect(log.direction).to eq('in')
expect(log.to_comment).to eq(nil)
expect(log.to_comment).to be_nil
expect(log.from_comment).to eq('CallerId Customer1')
expect(log.comment).to eq('normalClearing')
expect(log.state).to eq('hangup')
expect(log.done).to eq(true)
expect(log.done).to be(true)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_truthy
expect(log.end_at).to be_truthy
@ -365,11 +365,11 @@ RSpec.describe 'Integration Placetel', type: :request do
expect(log.to).to eq('030600000000')
expect(log.from).to eq('01114100300')
expect(log.direction).to eq('in')
expect(log.to_comment).to eq(nil)
expect(log.to_comment).to be_nil
expect(log.from_comment).to eq('CallerId Customer1')
expect(log.comment).to be_nil
expect(log.state).to eq('newCall')
expect(log.done).to eq(false)
expect(log.done).to be(false)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_nil
expect(log.end_at).to be_nil
@ -391,7 +391,7 @@ RSpec.describe 'Integration Placetel', type: :request do
expect(log.from_comment).to eq('CallerId Customer1')
expect(log.comment).to be_nil
expect(log.state).to eq('answer')
expect(log.done).to eq(true)
expect(log.done).to be(true)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_truthy
expect(log.end_at).to be_nil
@ -413,7 +413,7 @@ RSpec.describe 'Integration Placetel', type: :request do
expect(log.from_comment).to eq('CallerId Customer1')
expect(log.comment).to eq('normalClearing')
expect(log.state).to eq('hangup')
expect(log.done).to eq(false)
expect(log.done).to be(false)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_truthy
expect(log.end_at).to be_truthy
@ -431,11 +431,11 @@ RSpec.describe 'Integration Placetel', type: :request do
expect(log.to).to eq('030600000000')
expect(log.from).to eq('01114100300')
expect(log.direction).to eq('in')
expect(log.to_comment).to eq(nil)
expect(log.to_comment).to be_nil
expect(log.from_comment).to eq('CallerId Customer1')
expect(log.comment).to be_nil
expect(log.state).to eq('newCall')
expect(log.done).to eq(false)
expect(log.done).to be(false)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_nil
expect(log.end_at).to be_nil
@ -453,11 +453,11 @@ RSpec.describe 'Integration Placetel', type: :request do
expect(log.to).to eq('030600000000')
expect(log.from).to eq('01114100300')
expect(log.direction).to eq('in')
expect(log.to_comment).to eq(nil)
expect(log.to_comment).to be_nil
expect(log.from_comment).to eq('CallerId Customer1')
expect(log.comment).to eq('normalClearing')
expect(log.state).to eq('hangup')
expect(log.done).to eq(false)
expect(log.done).to be(false)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_nil
expect(log.end_at).to be_truthy
@ -475,13 +475,13 @@ RSpec.describe 'Integration Placetel', type: :request do
expect(log.to).to eq('030600000000')
expect(log.from).to eq('49999992222222')
expect(log.direction).to eq('in')
expect(log.to_comment).to eq(nil)
expect(log.to_comment).to be_nil
expect(log.from_comment).to eq('CallerId Customer3,CallerId Customer2')
expect(log.preferences['to']).to be_falsey
expect(log.preferences['from']).to be_truthy
expect(log.comment).to be_nil
expect(log.state).to eq('newCall')
expect(log.done).to eq(false)
expect(log.done).to be(false)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_nil
expect(log.end_at).to be_nil
@ -499,13 +499,13 @@ RSpec.describe 'Integration Placetel', type: :request do
expect(log.to).to eq('030600000000')
expect(log.from).to eq('anonymous')
expect(log.direction).to eq('in')
expect(log.to_comment).to eq(nil)
expect(log.to_comment).to be_nil
expect(log.from_comment).to be_nil
expect(log.preferences['to']).to be_falsey
expect(log.preferences['from']).to be_falsey
expect(log.comment).to be_nil
expect(log.state).to eq('newCall')
expect(log.done).to eq(false)
expect(log.done).to be(false)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_nil
expect(log.end_at).to be_nil
@ -533,7 +533,7 @@ RSpec.describe 'Integration Placetel', type: :request do
expect(json_response['list'][5]['call_id']).to eq('1234567890-2')
expect(json_response['list'][5]['state']).to eq('hangup')
expect(json_response['list'][5]['from']).to eq('4930777000000')
expect(json_response['list'][5]['from_comment']).to eq(nil)
expect(json_response['list'][5]['from_comment']).to be_nil
expect(json_response['list'][5]['to']).to eq('01114100300')
expect(json_response['list'][5]['to_comment']).to eq('CallerId Customer1')
expect(json_response['list'][5]['comment']).to eq('normalClearing')
@ -553,11 +553,11 @@ RSpec.describe 'Integration Placetel', type: :request do
expect(log.from).to eq('4930777000000')
expect(log.to).to eq('01114100300')
expect(log.direction).to eq('out')
expect(log.from_comment).to eq(nil)
expect(log.from_comment).to be_nil
expect(log.to_comment).to eq('CallerId Customer1')
expect(log.comment).to be_nil
expect(log.state).to eq('newCall')
expect(log.done).to eq(true)
expect(log.done).to be(true)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_nil
expect(log.end_at).to be_nil
@ -584,7 +584,7 @@ RSpec.describe 'Integration Placetel', type: :request do
expect(log.to_comment).to eq('CallerId Customer1')
expect(log.comment).to be_nil
expect(log.state).to eq('newCall')
expect(log.done).to eq(true)
expect(log.done).to be(true)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_nil
expect(log.end_at).to be_nil
@ -602,11 +602,11 @@ RSpec.describe 'Integration Placetel', type: :request do
expect(log.from).to eq('012345')
expect(log.to).to eq('030600000000')
expect(log.direction).to eq('in')
expect(log.from_comment).to eq(nil)
expect(log.from_comment).to be_nil
expect(log.to_comment).to eq('Bob Smith')
expect(log.comment).to be_nil
expect(log.state).to eq('newCall')
expect(log.done).to eq(false)
expect(log.done).to be(false)
expect(log.initialized_at).to be_truthy
expect(log.start_at).to be_nil
expect(log.end_at).to be_nil

View file

@ -217,7 +217,7 @@ RSpec.describe 'Integration Sipgate', type: :request do
expect(log.to_comment).to eq('CallerId Customer1')
expect(log.comment).to be_nil
expect(log.state).to eq('newCall')
expect(log.done).to eq(true)
expect(log.done).to be(true)
travel 1.second
@ -234,7 +234,7 @@ RSpec.describe 'Integration Sipgate', type: :request do
expect(log.to_comment).to eq('CallerId Customer1')
expect(log.comment).to eq('cancel')
expect(log.state).to eq('hangup')
expect(log.done).to eq(true)
expect(log.done).to be(true)
travel 1.second
@ -251,7 +251,7 @@ RSpec.describe 'Integration Sipgate', type: :request do
expect(log.to_comment).to eq('CallerId Customer1')
expect(log.comment).to be_nil
expect(log.state).to eq('newCall')
expect(log.done).to eq(true)
expect(log.done).to be(true)
travel 1.second
@ -268,7 +268,7 @@ RSpec.describe 'Integration Sipgate', type: :request do
expect(log.to_comment).to eq('CallerId Customer1')
expect(log.comment).to be_nil
expect(log.state).to eq('answer')
expect(log.done).to eq(true)
expect(log.done).to be(true)
travel 1.second
@ -285,7 +285,7 @@ RSpec.describe 'Integration Sipgate', type: :request do
expect(log.to_comment).to eq('CallerId Customer1')
expect(log.comment).to eq('normalClearing')
expect(log.state).to eq('hangup')
expect(log.done).to eq(true)
expect(log.done).to be(true)
travel 1.second
@ -302,7 +302,7 @@ RSpec.describe 'Integration Sipgate', type: :request do
expect(log.from_comment).to eq('CallerId Customer1')
expect(log.comment).to be_nil
expect(log.state).to eq('newCall')
expect(log.done).to eq(false)
expect(log.done).to be(false)
travel 1.second
@ -319,7 +319,7 @@ RSpec.describe 'Integration Sipgate', type: :request do
expect(log.from_comment).to eq('CallerId Customer1')
expect(log.comment).to be_nil
expect(log.state).to eq('answer')
expect(log.done).to eq(true)
expect(log.done).to be(true)
travel 1.second
@ -336,7 +336,7 @@ RSpec.describe 'Integration Sipgate', type: :request do
expect(log.from_comment).to eq('CallerId Customer1')
expect(log.comment).to eq('normalClearing')
expect(log.state).to eq('hangup')
expect(log.done).to eq(true)
expect(log.done).to be(true)
travel 1.second
@ -353,7 +353,7 @@ RSpec.describe 'Integration Sipgate', type: :request do
expect(log.from_comment).to eq('CallerId Customer1')
expect(log.comment).to be_nil
expect(log.state).to eq('newCall')
expect(log.done).to eq(false)
expect(log.done).to be(false)
travel 1.second
@ -370,7 +370,7 @@ RSpec.describe 'Integration Sipgate', type: :request do
expect(log.from_comment).to eq('CallerId Customer1')
expect(log.comment).to be_nil
expect(log.state).to eq('answer')
expect(log.done).to eq(true)
expect(log.done).to be(true)
travel 1.second
@ -387,7 +387,7 @@ RSpec.describe 'Integration Sipgate', type: :request do
expect(log.from_comment).to eq('CallerId Customer1')
expect(log.comment).to eq('normalClearing')
expect(log.state).to eq('hangup')
expect(log.done).to eq(false)
expect(log.done).to be(false)
travel 1.second
@ -404,7 +404,7 @@ RSpec.describe 'Integration Sipgate', type: :request do
expect(log.from_comment).to eq('CallerId Customer1')
expect(log.comment).to be_nil
expect(log.state).to eq('newCall')
expect(log.done).to eq(false)
expect(log.done).to be(false)
travel 1.second
@ -421,7 +421,7 @@ RSpec.describe 'Integration Sipgate', type: :request do
expect(log.from_comment).to eq('CallerId Customer1')
expect(log.comment).to eq('normalClearing')
expect(log.state).to eq('hangup')
expect(log.done).to eq(false)
expect(log.done).to be(false)
travel 1.second
@ -440,7 +440,7 @@ RSpec.describe 'Integration Sipgate', type: :request do
expect(log.preferences['from']).to be_truthy
expect(log.comment).to be_nil
expect(log.state).to eq('newCall')
expect(log.done).to eq(false)
expect(log.done).to be(false)
# get caller list
get '/api/v1/cti/log'

View file

@ -156,9 +156,9 @@ RSpec.describe 'Integration SMIME', type: :request do
post endpoint, params: search_query, as: :json
expect(response).to have_http_status(:ok)
expect(json_response['encryption']['success']).to eq(false)
expect(json_response['encryption']['success']).to be(false)
expect(json_response['encryption']['comment']).to include(email_address)
expect(json_response['sign']['success']).to eq(false)
expect(json_response['sign']['success']).to be(false)
expect(json_response['sign']['comment']).to include(email_address)
end
end
@ -173,9 +173,9 @@ RSpec.describe 'Integration SMIME', type: :request do
post endpoint, params: search_query, as: :json
expect(response).to have_http_status(:ok)
expect(json_response['encryption']['success']).to eq(true)
expect(json_response['encryption']['success']).to be(true)
expect(json_response['encryption']['comment']).to include(email_address)
expect(json_response['sign']['success']).to eq(true)
expect(json_response['sign']['success']).to be(true)
expect(json_response['sign']['comment']).to include(email_address)
end
@ -186,9 +186,9 @@ RSpec.describe 'Integration SMIME', type: :request do
post endpoint, params: search_query, as: :json
expect(response).to have_http_status(:ok)
expect(json_response['encryption']['success']).to eq(false)
expect(json_response['encryption']['success']).to be(false)
expect(json_response['encryption']['comment']).to include(email_address).and include('expired')
expect(json_response['sign']['success']).to eq(false)
expect(json_response['sign']['success']).to be(false)
expect(json_response['sign']['comment']).to include(email_address).and include('expired')
end
end

View file

@ -518,7 +518,7 @@ RSpec.describe 'Organization', type: :request, searchindex: true do
expect(response).to have_http_status(:ok)
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['try']).to eq(true)
expect(json_response['try']).to be(true)
expect(json_response['records']).to be_empty
expect(json_response['result']).to eq('failed')
expect(json_response['errors'].count).to eq(2)
@ -531,7 +531,7 @@ RSpec.describe 'Organization', type: :request, searchindex: true do
expect(response).to have_http_status(:ok)
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['try']).to eq(true)
expect(json_response['try']).to be(true)
expect(json_response['records'].count).to eq(2)
expect(json_response['result']).to eq('success')
@ -544,7 +544,7 @@ RSpec.describe 'Organization', type: :request, searchindex: true do
expect(response).to have_http_status(:ok)
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['try']).to eq(false)
expect(json_response['try']).to be(false)
expect(json_response['records'].count).to eq(2)
expect(json_response['result']).to eq('success')
@ -553,13 +553,13 @@ RSpec.describe 'Organization', type: :request, searchindex: true do
expect(organization1.name).to eq('organization-member-import1')
expect(organization1.members.count).to eq(1)
expect(organization1.members.first.login).to eq(customer1.login)
expect(organization1.active).to eq(true)
expect(organization1.active).to be(true)
organization2 = Organization.find_by(name: 'organization-member-import2')
expect(organization2).to be_truthy
expect(organization2.name).to eq('organization-member-import2')
expect(organization2.members.count).to eq(1)
expect(organization2.members.first.login).to eq(customer2.login)
expect(organization2.active).to eq(false)
expect(organization2.active).to be(false)
end
end
end

View file

@ -140,7 +140,7 @@ RSpec.describe 'Overviews', type: :request do
post '/api/v1/overviews_prio', params: params, as: :json
expect(response).to have_http_status(:ok)
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['success']).to eq(true)
expect(json_response['success']).to be(true)
overview1.reload
overview2.reload

View file

@ -55,8 +55,8 @@ RSpec.describe 'Settings', type: :request do
hit_product_name = true
end
end
expect(hit_api).to eq(true)
expect(hit_product_name).to eq(true)
expect(hit_api).to be(true)
expect(hit_product_name).to be(true)
# show
setting = Setting.find_by(name: 'product_name')
@ -87,7 +87,7 @@ RSpec.describe 'Settings', type: :request do
expect(json_response['name']).to eq('product_name')
expect(json_response['preferences']['permission'].length).to eq(1)
expect(json_response['preferences']['permission'][0]).to eq('admin.branding')
expect(json_response['preferences']['some_new_key']).to eq(true)
expect(json_response['preferences']['some_new_key']).to be(true)
# update
setting = Setting.find_by(name: 'api_token_access')
@ -105,7 +105,7 @@ RSpec.describe 'Settings', type: :request do
expect(json_response['name']).to eq('api_token_access')
expect(json_response['preferences']['permission'].length).to eq(1)
expect(json_response['preferences']['permission'][0]).to eq('admin.api')
expect(json_response['preferences']['some_new_key']).to eq(true)
expect(json_response['preferences']['some_new_key']).to be(true)
# delete
setting = Setting.find_by(name: 'product_name')
@ -132,8 +132,8 @@ RSpec.describe 'Settings', type: :request do
hit_product_name = true
end
end
expect(hit_api).to eq(true)
expect(hit_product_name).to eq(false)
expect(hit_api).to be(true)
expect(hit_product_name).to be(false)
# show
setting = Setting.find_by(name: 'product_name')
@ -177,7 +177,7 @@ RSpec.describe 'Settings', type: :request do
expect(json_response['name']).to eq('api_token_access')
expect(json_response['preferences']['permission'].length).to eq(1)
expect(json_response['preferences']['permission'][0]).to eq('admin.api')
expect(json_response['preferences']['some_new_key']).to eq(true)
expect(json_response['preferences']['some_new_key']).to be(true)
# delete
setting = Setting.find_by(name: 'product_name')
@ -229,7 +229,7 @@ RSpec.describe 'Settings', type: :request do
it 'protected setting not existing in list' do
authenticated_as(admin)
get '/api/v1/settings', params: {}, as: :json
expect(json_response.detect { |setting| setting['name'] == 'application_secret' }).to eq(nil)
expect(json_response.detect { |setting| setting['name'] == 'application_secret' }).to be_nil
end
it 'can not show protected setting' do

View file

@ -41,7 +41,7 @@ RSpec.describe 'Taskbars', type: :request do
expect(json_response['client_id']).to eq('123')
expect(json_response['user_id']).to eq(agent.id)
expect(json_response['params']['ticket_id']).to eq(5)
expect(json_response['params']['shown']).to eq(true)
expect(json_response['params']['shown']).to be(true)
taskbar_id = json_response['id']
params[:user_id] = customer.id
@ -55,7 +55,7 @@ RSpec.describe 'Taskbars', type: :request do
expect(json_response['client_id']).to eq('123')
expect(json_response['user_id']).to eq(agent.id)
expect(json_response['params']['ticket_id']).to eq(5)
expect(json_response['params']['shown']).to eq(false)
expect(json_response['params']['shown']).to be(false)
# try to access with other user
params = {

View file

@ -86,7 +86,7 @@ RSpec.describe 'Text Module', type: :request do
expect(response).to have_http_status(:ok)
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['try']).to eq(false)
expect(json_response['try']).to be(false)
expect(json_response['records'].count).to eq(2)
expect(json_response['result']).to eq('success')

View file

@ -131,7 +131,7 @@ AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['subject']).to be_nil
expect(json_response['body']).to eq('some body')
expect(json_response['internal']).to eq(false)
expect(json_response['internal']).to be(false)
expect(json_response['content_type']).to eq('text/plain')
expect(json_response['updated_by_id']).to eq(agent.id)
expect(json_response['created_by_id']).to eq(agent.id)
@ -152,7 +152,7 @@ AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['subject']).to be_nil
expect(json_response['body']).not_to eq('some body 2')
expect(json_response['internal']).to eq(true)
expect(json_response['internal']).to be(true)
expect(json_response['content_type']).to eq('text/plain')
expect(json_response['updated_by_id']).to eq(agent.id)
expect(json_response['created_by_id']).to eq(agent.id)
@ -214,7 +214,7 @@ AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
ticket = Ticket.find(json_response['ticket_id'])
expect(ticket.articles.count).to eq(3)
expect(ticket.articles[2].sender.name).to eq('Customer')
expect(ticket.articles[2].internal).to eq(false)
expect(ticket.articles[2].internal).to be(false)
expect(ticket.articles[0].attachments.count).to eq(0)
expect(ticket.articles[1].attachments.count).to eq(0)
expect(ticket.articles[2].attachments.count).to eq(0)
@ -239,7 +239,7 @@ AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
ticket = Ticket.find(json_response['ticket_id'])
expect(ticket.articles.count).to eq(4)
expect(ticket.articles[3].sender.name).to eq('Customer')
expect(ticket.articles[3].internal).to eq(false)
expect(ticket.articles[3].internal).to be(false)
expect(ticket.articles[0].attachments.count).to eq(0)
expect(ticket.articles[1].attachments.count).to eq(0)
expect(ticket.articles[2].attachments.count).to eq(0)

View file

@ -879,7 +879,7 @@ RSpec.describe 'Ticket', type: :request do
expect(article_json_response['subject']).to eq('some subject')
expect(article_json_response['body']).to eq('some body')
expect(article_json_response['content_type']).to eq('text/plain')
expect(article_json_response['internal']).to eq(false)
expect(article_json_response['internal']).to be(false)
expect(article_json_response['created_by_id']).to eq(agent.id)
expect(article_json_response['sender_id']).to eq(Ticket::Article::Sender.lookup(name: 'Agent').id)
expect(article_json_response['type_id']).to eq(Ticket::Article::Type.lookup(name: 'note').id)
@ -924,7 +924,7 @@ RSpec.describe 'Ticket', type: :request do
expect(json_response['subject']).to eq('some subject')
expect(json_response['body']).to eq('some body')
expect(json_response['content_type']).to eq('text/plain')
expect(json_response['internal']).to eq(true)
expect(json_response['internal']).to be(true)
expect(json_response['created_by_id']).to eq(agent.id)
expect(json_response['sender_id']).to eq(Ticket::Article::Sender.lookup(name: 'Agent').id)
expect(json_response['type_id']).to eq(Ticket::Article::Type.lookup(name: 'email').id)
@ -940,7 +940,7 @@ RSpec.describe 'Ticket', type: :request do
expect(json_response['subject']).not_to eq('new subject')
expect(json_response['body']).to eq('some body')
expect(json_response['content_type']).to eq('text/plain')
expect(json_response['internal']).to eq(true)
expect(json_response['internal']).to be(true)
expect(json_response['created_by_id']).to eq(agent.id)
expect(json_response['sender_id']).to eq(Ticket::Article::Sender.lookup(name: 'Agent').id)
expect(json_response['type_id']).to eq(Ticket::Article::Type.lookup(name: 'email').id)
@ -955,7 +955,7 @@ RSpec.describe 'Ticket', type: :request do
}
post '/api/v1/ticket_articles', params: params, as: :json
expect(response).to have_http_status(:created)
expect(json_response['internal']).to eq(false)
expect(json_response['internal']).to be(false)
delete "/api/v1/ticket_articles/#{json_response['id']}", params: {}, as: :json
expect(response).to have_http_status(:forbidden)
@ -1012,7 +1012,7 @@ RSpec.describe 'Ticket', type: :request do
expect(json_response['subject']).to eq('some subject')
expect(json_response['body']).to eq('some body')
expect(json_response['content_type']).to eq('text/plain')
expect(json_response['internal']).to eq(false)
expect(json_response['internal']).to be(false)
expect(json_response['created_by_id']).to eq(admin.id)
expect(json_response['sender_id']).to eq(Ticket::Article::Sender.lookup(name: 'Agent').id)
expect(json_response['type_id']).to eq(Ticket::Article::Type.lookup(name: 'note').id)
@ -1029,7 +1029,7 @@ RSpec.describe 'Ticket', type: :request do
expect(json_response['subject']).not_to eq('new subject')
expect(json_response['body']).to eq('some body')
expect(json_response['content_type']).to eq('text/plain')
expect(json_response['internal']).to eq(true)
expect(json_response['internal']).to be(true)
expect(json_response['created_by_id']).to eq(admin.id)
expect(json_response['sender_id']).to eq(Ticket::Article::Sender.lookup(name: 'Agent').id)
expect(json_response['type_id']).to eq(Ticket::Article::Type.lookup(name: 'note').id)
@ -1051,7 +1051,7 @@ RSpec.describe 'Ticket', type: :request do
expect(json_response['subject']).to eq('some subject')
expect(json_response['body']).to eq('some body')
expect(json_response['content_type']).to eq('text/plain')
expect(json_response['internal']).to eq(false)
expect(json_response['internal']).to be(false)
expect(json_response['created_by_id']).to eq(admin.id)
expect(json_response['sender_id']).to eq(Ticket::Article::Sender.lookup(name: 'Agent').id)
expect(json_response['type_id']).to eq(Ticket::Article::Type.lookup(name: 'email').id)
@ -1347,7 +1347,7 @@ RSpec.describe 'Ticket', type: :request do
expect(json_response['subject']).to eq('some subject')
expect(json_response['body']).to eq('some body')
expect(json_response['content_type']).to eq('text/plain')
expect(json_response['internal']).to eq(false)
expect(json_response['internal']).to be(false)
expect(json_response['created_by_id']).to eq(customer.id)
expect(json_response['sender_id']).to eq(Ticket::Article::Sender.lookup(name: 'Customer').id)
expect(json_response['type_id']).to eq(Ticket::Article::Type.lookup(name: 'web').id)

View file

@ -454,14 +454,14 @@ RSpec.describe 'User', type: :request do
expect(json_response[0]['id']).to eq(json_response1['id'])
expect(json_response[0]['label']).to eq("Customer#{firstname} Customer Last <new_customer_by_agent@example.com>")
expect(json_response[0]['value']).to eq('new_customer_by_agent@example.com')
expect(json_response[0]['inactive']).to eq(false)
expect(json_response[0]['inactive']).to be(false)
expect(json_response[0]['role_ids']).to be_falsey
expect(json_response[0]['roles']).to be_falsey
get "/api/v1/users/search?term=#{CGI.escape('CustomerInactive')}", params: {}, as: :json
expect(response).to have_http_status(:ok)
expect(json_response).to be_a_kind_of(Array)
expect(json_response[0]['inactive']).to eq(true)
expect(json_response[0]['inactive']).to be(true)
# Regression test for issue #2539 - search pagination broken in users_controller.rb
# Get the total number of users N, then search with one result per page, so there should N pages with one result each
@ -897,7 +897,7 @@ RSpec.describe 'User', type: :request do
expect(response).to have_http_status(:ok)
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['try']).to eq(true)
expect(json_response['try']).to be(true)
expect(json_response['records']).to be_empty
expect(json_response['result']).to eq('failed')
expect(json_response['errors'].count).to eq(2)
@ -910,7 +910,7 @@ RSpec.describe 'User', type: :request do
expect(response).to have_http_status(:ok)
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['try']).to eq(true)
expect(json_response['try']).to be(true)
expect(json_response['records'].count).to eq(2)
expect(json_response['result']).to eq('success')
@ -923,7 +923,7 @@ RSpec.describe 'User', type: :request do
expect(response).to have_http_status(:ok)
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['try']).to eq(false)
expect(json_response['try']).to be(false)
expect(json_response['records'].count).to eq(2)
expect(json_response['result']).to eq('success')
@ -933,14 +933,14 @@ RSpec.describe 'User', type: :request do
expect(user1.firstname).to eq('firstname-simple-import1')
expect(user1.lastname).to eq('lastname-simple-import1')
expect(user1.email).to eq('user-simple-import1@example.com')
expect(user1.active).to eq(true)
expect(user1.active).to be(true)
user2 = User.find_by(login: 'user-simple-import2')
expect(user2).to be_truthy
expect(user2.login).to eq('user-simple-import2')
expect(user2.firstname).to eq('firstname-simple-import2')
expect(user2.lastname).to eq('lastname-simple-import2')
expect(user2.email).to eq('user-simple-import2@example.com')
expect(user2.active).to eq(false)
expect(user2.active).to be(false)
user1.destroy!
user2.destroy!

View file

@ -16,19 +16,19 @@ RSpec.describe 'Assets', type: :system, db_strategy: :reset do
describe 'when customer', authenticated_as: :customer do
it 'can not access group details' do
expect(group_note).to be nil
expect(group_note).to be_nil
end
end
describe 'when agent', authenticated_as: :agent do
it 'can access group details' do
expect(group_note).not_to be nil
expect(group_note).not_to be_nil
end
end
describe 'when admin', authenticated_as: :admin do
it 'can access group details' do
expect(group_note).not_to be nil
expect(group_note).not_to be_nil
end
end
end
@ -44,19 +44,19 @@ RSpec.describe 'Assets', type: :system, db_strategy: :reset do
describe 'when customer', authenticated_as: :customer do
it 'can not access organization details' do
expect(organization_note).to be nil
expect(organization_note).to be_nil
end
end
describe 'when agent', authenticated_as: :agent do
it 'can access organization details' do
expect(organization_note).not_to be nil
expect(organization_note).not_to be_nil
end
end
describe 'when admin', authenticated_as: :admin do
it 'can access organization details' do
expect(organization_note).not_to be nil
expect(organization_note).not_to be_nil
end
end
end
@ -117,11 +117,11 @@ RSpec.describe 'Assets', type: :system, db_strategy: :reset do
describe 'when customer', authenticated_as: :customer do
it 'can access customer email' do
expect(customer_email).not_to be nil
expect(customer_email).not_to be_nil
end
it 'can not access customer note' do
expect(customer_note).to be nil
expect(customer_note).to be_nil
end
it 'can not access owner details' do
@ -129,17 +129,17 @@ RSpec.describe 'Assets', type: :system, db_strategy: :reset do
end
it 'can access owner firstname' do
expect(owner_firstname).not_to be nil
expect(owner_firstname).not_to be_nil
end
end
describe 'when agent', authenticated_as: :agent do
it 'can access customer email' do
expect(customer_email).not_to be nil
expect(customer_email).not_to be_nil
end
it 'can access customer note' do
expect(customer_note).not_to be nil
expect(customer_note).not_to be_nil
end
it 'can access owner details' do
@ -147,17 +147,17 @@ RSpec.describe 'Assets', type: :system, db_strategy: :reset do
end
it 'can access owner firstname' do
expect(owner_firstname).not_to be nil
expect(owner_firstname).not_to be_nil
end
end
describe 'when admin', authenticated_as: :admin do
it 'can access customer email' do
expect(customer_email).not_to be nil
expect(customer_email).not_to be_nil
end
it 'can access customer note' do
expect(customer_note).not_to be nil
expect(customer_note).not_to be_nil
end
it 'can access owner details' do
@ -165,7 +165,7 @@ RSpec.describe 'Assets', type: :system, db_strategy: :reset do
end
it 'can access owner firstname' do
expect(owner_firstname).not_to be nil
expect(owner_firstname).not_to be_nil
end
end
end

View file

@ -15,7 +15,7 @@ RSpec.describe 'Authentication', type: :system do
# Check that cookies is temporary.
cookie = cookie('^_zammad.+?')
expect(cookie[:expires]).to eq(nil)
expect(cookie[:expires]).to be_nil
end
it 'Login with remember me', authenticated_as: false do
@ -38,7 +38,7 @@ RSpec.describe 'Authentication', type: :system do
# Check that cookies has no longer a expire date after logout.
cookie = cookie('^_zammad.+?')
expect(cookie[:expires]).to eq(nil)
expect(cookie[:expires]).to be_nil
end
it 'Logout' do

View file

@ -81,7 +81,7 @@ RSpec.describe 'Manage > Groups', type: :system do
click_button
end
expect(Group.find_by(name: 'Users').assignment_timeout).to be nil
expect(Group.find_by(name: 'Users').assignment_timeout).to be_nil
end
end
end

View file

@ -55,8 +55,8 @@ RSpec.describe 'Ticket Create', type: :system do
expect(page).to have_no_css('span', text: 'Encrypted')
security_result = Ticket::Article.last.preferences['security']
expect(security_result['encryption']['success']).to be nil
expect(security_result['sign']['success']).to be nil
expect(security_result['encryption']['success']).to be_nil
expect(security_result['sign']['success']).to be_nil
end
end
end
@ -108,8 +108,8 @@ RSpec.describe 'Ticket Create', type: :system do
expect(page).to have_no_css('span', text: 'Encrypted')
security_result = Ticket::Article.last.preferences['security']
expect(security_result['encryption']['success']).to be nil
expect(security_result['sign']['success']).to be nil
expect(security_result['encryption']['success']).to be_nil
expect(security_result['sign']['success']).to be_nil
end
end
@ -136,7 +136,7 @@ RSpec.describe 'Ticket Create', type: :system do
expect(page).to have_no_css('span', text: 'Encrypted')
security_result = Ticket::Article.last.preferences['security']
expect(security_result['encryption']['success']).to be nil
expect(security_result['encryption']['success']).to be_nil
expect(security_result['sign']['success']).to be true
end
end
@ -165,7 +165,7 @@ RSpec.describe 'Ticket Create', type: :system do
security_result = Ticket::Article.last.preferences['security']
expect(security_result['encryption']['success']).to be true
expect(security_result['sign']['success']).to be nil
expect(security_result['sign']['success']).to be_nil
end
end
@ -680,7 +680,7 @@ RSpec.describe 'Ticket Create', type: :system do
click '.js-submit'
expect(current_url).to include('ticket/zoom')
expect(Ticket.last.state_id).to eq(Ticket::State.find_by(name: 'pending customer feedback').id)
expect(Ticket.last.pending_time).to be nil
expect(Ticket.last.pending_time).to be_nil
end
end

View file

@ -99,7 +99,7 @@ RSpec.describe 'Ticket Update', type: :system do
expect(page).to have_no_css('.js-submitDropdown .js-submit[disabled]')
ticket.reload
expect(ticket[date_attribute.name]).to eq(nil)
expect(ticket[date_attribute.name]).to be_nil
end
end
end
@ -217,7 +217,7 @@ RSpec.describe 'Ticket Update', type: :system do
expect(article).to be_present
expect(article.body).to eq('test body')
expect(article.subject).to eq('test sub')
expect(article.internal).to eq(true)
expect(article.internal).to be(true)
end
end
end

View file

@ -669,8 +669,8 @@ RSpec.describe 'Ticket zoom', type: :system do
click '.js-submit'
expect(page).to have_css('.ticket-article-item', count: 2)
expect(Ticket::Article.last.preferences['security']['encryption']['success']).to be nil
expect(Ticket::Article.last.preferences['security']['sign']['success']).to be nil
expect(Ticket::Article.last.preferences['security']['encryption']['success']).to be_nil
expect(Ticket::Article.last.preferences['security']['sign']['success']).to be_nil
end
it 'signed' do
@ -687,7 +687,7 @@ RSpec.describe 'Ticket zoom', type: :system do
click '.js-submit'
expect(page).to have_css('.ticket-article-item', count: 2)
expect(Ticket::Article.last.preferences['security']['encryption']['success']).to be nil
expect(Ticket::Article.last.preferences['security']['encryption']['success']).to be_nil
expect(Ticket::Article.last.preferences['security']['sign']['success']).to be true
end
@ -706,7 +706,7 @@ RSpec.describe 'Ticket zoom', type: :system do
expect(page).to have_css('.ticket-article-item', count: 2)
expect(Ticket::Article.last.preferences['security']['encryption']['success']).to be true
expect(Ticket::Article.last.preferences['security']['sign']['success']).to be nil
expect(Ticket::Article.last.preferences['security']['sign']['success']).to be_nil
end
it 'signed and encrypted' do
@ -1641,7 +1641,7 @@ RSpec.describe 'Ticket zoom', type: :system do
content = find('.sidebar[data-tab=gitlab] .sidebar-content')
expect(content).to have_text('No linked issues')
expect(ticket.reload.preferences[:gitlab][:issue_links][0]).to be nil
expect(ticket.reload.preferences[:gitlab][:issue_links][0]).to be_nil
# check that counter got removed
expect(page).to have_no_selector('.tabsSidebar-tab[data-tab=gitlab] .js-tabCounter')
@ -1692,7 +1692,7 @@ RSpec.describe 'Ticket zoom', type: :system do
content = find('.sidebar[data-tab=github] .sidebar-content')
expect(content).to have_text('No linked issues')
expect(ticket.reload.preferences[:github][:issue_links][0]).to be nil
expect(ticket.reload.preferences[:github][:issue_links][0]).to be_nil
# check that counter got removed
expect(page).to have_no_selector('.tabsSidebar-tab[data-tab=github] .js-tabCounter')