Browse Source

Maintenance: Update dependency rubocop-rspec to v2.26.1

renovatebot 1 year ago
parent
commit
a62c590b13

+ 6 - 0
.rubocop/default.yml

@@ -409,6 +409,9 @@ Capybara/NegationMatcher:
   Description: Enforces use of have_no_* or not_to for negated expectations.
   EnforcedStyle: have_no
 
+Capybara/ClickLinkOrButtonStyle:
+  EnforcedStyle: link_or_button
+
 RSpec/ExampleLength:
   CountAsOne:
     - 'array'
@@ -416,6 +419,9 @@ RSpec/ExampleLength:
     - 'heredoc'
   Max: 25
 
+FactoryBot/ExcessiveCreateList:
+  Enabled: false
+
 Zammad/PreferNegatedIfOverUnless:
   Exclude:
     - 'bin/rspec'

+ 4 - 4
Gemfile.lock

@@ -549,10 +549,10 @@ GEM
       unicode-display_width (>= 2.4.0, < 3.0)
     rubocop-ast (1.30.0)
       parser (>= 3.2.1.0)
-    rubocop-capybara (2.19.0)
+    rubocop-capybara (2.20.0)
+      rubocop (~> 1.41)
+    rubocop-factory_bot (2.25.1)
       rubocop (~> 1.41)
-    rubocop-factory_bot (2.24.0)
-      rubocop (~> 1.33)
     rubocop-faker (1.1.0)
       faker (>= 2.12.0)
       rubocop (>= 0.82.0)
@@ -570,7 +570,7 @@ GEM
       rack (>= 1.1)
       rubocop (>= 1.33.0, < 2.0)
       rubocop-ast (>= 1.30.0, < 2.0)
-    rubocop-rspec (2.25.0)
+    rubocop-rspec (2.26.1)
       rubocop (~> 1.40)
       rubocop-capybara (~> 2.17)
       rubocop-factory_bot (~> 2.22)

+ 4 - 4
spec/db/migrate/issue_2401_convert_user_login_email_to_unicode_spec.rb

@@ -26,8 +26,8 @@ RSpec.describe Issue2401ConvertUserLoginEmailToUnicode, db_strategy: :reset, typ
       create_user
       migrate
 
-      expect(User).to be_exist(login: 'john.doe@äcme.corp')
-        .and(be_exist(email: 'john.doe@äcme.corp'))
+      expect(User).to exist(login: 'john.doe@äcme.corp')
+        .and(exist(email: 'john.doe@äcme.corp'))
 
     end
   end
@@ -44,8 +44,8 @@ RSpec.describe Issue2401ConvertUserLoginEmailToUnicode, db_strategy: :reset, typ
     it 'still allows to lookup user with origin login/email', :aggregate_failures do
       migrate
 
-      expect(User).to be_exist(login: 'john.doe@äcme.corp')
-        .and(be_exist(email: 'john.doe@äcme.corp'))
+      expect(User).to exist(login: 'john.doe@äcme.corp')
+        .and(exist(email: 'john.doe@äcme.corp'))
     end
 
   end

+ 2 - 2
spec/graphql/gql/mutations/online_notification/delete_spec.rb

@@ -27,7 +27,7 @@ RSpec.describe Gql::Mutations::OnlineNotification::Delete, authenticated_as: :us
     let(:notification_to_delete) { notification }
 
     it 'deletes notification' do
-      expect(notification.class).not_to be_exist(notification.id)
+      expect(notification.class).not_to exist(notification.id)
     end
   end
 
@@ -35,7 +35,7 @@ RSpec.describe Gql::Mutations::OnlineNotification::Delete, authenticated_as: :us
     let(:notification_to_delete) { another_user_notification }
 
     it 'does not delete notification' do
-      expect(notification.class).to be_exist(notification.id)
+      expect(notification.class).to exist(notification.id)
     end
   end
 end

+ 3 - 3
spec/graphql/gql/mutations/ticket/live_user/delete_spec.rb

@@ -32,7 +32,7 @@ RSpec.describe Gql::Mutations::Ticket::LiveUser::Delete, :aggregate_failures, ty
 
     context 'when live user entry does exist' do
       it 'does delete' do
-        expect(live_user_entry.class).not_to be_exist(live_user_entry.id)
+        expect(live_user_entry.class).not_to exist(live_user_entry.id)
       end
 
       it 'returns success' do
@@ -44,7 +44,7 @@ RSpec.describe Gql::Mutations::Ticket::LiveUser::Delete, :aggregate_failures, ty
       let(:live_user_entry) { create(:taskbar, key: "Ticket-#{ticket.id}", user: User.find(1)) }
 
       it 'does not delete' do
-        expect(live_user_entry.class).to be_exist(live_user_entry.id)
+        expect(live_user_entry.class).to exist(live_user_entry.id)
       end
     end
 
@@ -52,7 +52,7 @@ RSpec.describe Gql::Mutations::Ticket::LiveUser::Delete, :aggregate_failures, ty
       let(:live_user_entry) { create(:taskbar, key: "Ticket-#{ticket.id}", user: agent, app: 'desktop') }
 
       it 'does not delete' do
-        expect(live_user_entry.class).to be_exist(live_user_entry.id)
+        expect(live_user_entry.class).to exist(live_user_entry.id)
       end
     end
 

+ 13 - 13
spec/integration/clearbit_spec.rb

@@ -50,7 +50,7 @@ RSpec.describe 'Clearbit', aggregate_failures: true, current_user_id: 1, integra
     end
 
     it 'enriches the customer' do
-      expect(ExternalSync).to be_exist(source: 'clearbit', object: 'User', o_id: customer.id)
+      expect(ExternalSync).to exist(source: 'clearbit', object: 'User', o_id: customer.id)
 
       expect(customer).to have_attributes(
         firstname: 'Should',
@@ -61,7 +61,7 @@ RSpec.describe 'Clearbit', aggregate_failures: true, current_user_id: 1, integra
     end
 
     it 'creates organization with enriched data' do
-      expect(ExternalSync).to be_exist(source: 'clearbit', object: 'Organization', o_id: customer.organization.id)
+      expect(ExternalSync).to exist(source: 'clearbit', object: 'Organization', o_id: customer.organization.id)
 
       expect(customer.organization).to have_attributes(
         name:   'Uber, Inc.',
@@ -86,7 +86,7 @@ RSpec.describe 'Clearbit', aggregate_failures: true, current_user_id: 1, integra
       let(:clearbit_config_company_bio) { 'organization.note_not_existing' }
 
       it 'syncs the rest of user fields' do
-        expect(ExternalSync).to be_exist(source: 'clearbit', object: 'User', o_id: customer.id)
+        expect(ExternalSync).to exist(source: 'clearbit', object: 'User', o_id: customer.id)
 
         expect(customer).to have_attributes(
           firstname: 'Should',
@@ -96,7 +96,7 @@ RSpec.describe 'Clearbit', aggregate_failures: true, current_user_id: 1, integra
       end
 
       it 'syncs the rest of organization fields' do
-        expect(ExternalSync).to be_exist(source: 'clearbit', object: 'Organization', o_id: customer.organization.id)
+        expect(ExternalSync).to exist(source: 'clearbit', object: 'Organization', o_id: customer.organization.id)
 
         expect(customer.organization).to have_attributes(
           name: 'Uber, Inc.',
@@ -125,7 +125,7 @@ RSpec.describe 'Clearbit', aggregate_failures: true, current_user_id: 1, integra
     end
 
     it 'enriches the customer' do
-      expect(ExternalSync).to be_exist(source: 'clearbit', object: 'User', o_id: customer.id)
+      expect(ExternalSync).to exist(source: 'clearbit', object: 'User', o_id: customer.id)
 
       expect(customer).to have_attributes(
         firstname: 'Martin',
@@ -136,7 +136,7 @@ RSpec.describe 'Clearbit', aggregate_failures: true, current_user_id: 1, integra
     end
 
     it 'creates organization with enriched data' do
-      expect(ExternalSync).to be_exist(source: 'clearbit', object: 'Organization', o_id: customer.organization.id)
+      expect(ExternalSync).to exist(source: 'clearbit', object: 'Organization', o_id: customer.organization.id)
 
       expect(customer.organization).to have_attributes(
         name: 'OTRS',
@@ -228,7 +228,7 @@ RSpec.describe 'Clearbit', aggregate_failures: true, current_user_id: 1, integra
     end
 
     it 'does not enrich the customer' do
-      expect(ExternalSync).not_to be_exist(source: 'clearbit', object: 'User', o_id: customer.id)
+      expect(ExternalSync).not_to exist(source: 'clearbit', object: 'User', o_id: customer.id)
 
       expect(customer.reload).to have_attributes(
         firstname: '',
@@ -240,7 +240,7 @@ RSpec.describe 'Clearbit', aggregate_failures: true, current_user_id: 1, integra
     end
 
     it 'creates organization with enriched data' do
-      expect(ExternalSync).to be_exist(source: 'clearbit', object: 'Organization', o_id: customer.organization.id)
+      expect(ExternalSync).to exist(source: 'clearbit', object: 'Organization', o_id: customer.organization.id)
 
       expect(customer.organization).to have_attributes(
         name: 'Znuny / ES for OTRS',
@@ -281,7 +281,7 @@ RSpec.describe 'Clearbit', aggregate_failures: true, current_user_id: 1, integra
     it 'does not create organization with enriched data' do
       expect(customer.organization).to be_present
 
-      expect(Organization).not_to be_exist(name: 'ZnunyOfFred')
+      expect(Organization).not_to exist(name: 'ZnunyOfFred')
     end
   end
 
@@ -315,7 +315,7 @@ RSpec.describe 'Clearbit', aggregate_failures: true, current_user_id: 1, integra
     end
 
     it 'enriches the customer' do
-      expect(ExternalSync).to be_exist(source: 'clearbit', object: 'User', o_id: customer.id)
+      expect(ExternalSync).to exist(source: 'clearbit', object: 'User', o_id: customer.id)
 
       expect(customer).to have_attributes(
         firstname: 'Alex',
@@ -363,7 +363,7 @@ RSpec.describe 'Clearbit', aggregate_failures: true, current_user_id: 1, integra
     end
 
     it 'does not enrich the customer' do
-      expect(ExternalSync).not_to be_exist(source: 'clearbit', object: 'User', o_id: customer.id)
+      expect(ExternalSync).not_to exist(source: 'clearbit', object: 'User', o_id: customer.id)
 
       expect(customer).to have_attributes(
         firstname: '',
@@ -384,7 +384,7 @@ RSpec.describe 'Clearbit', aggregate_failures: true, current_user_id: 1, integra
     end
 
     it 'creates organization with enriched data' do
-      expect(ExternalSync).to be_exist(source: 'clearbit', object: 'Organization', o_id: customer.organization.id)
+      expect(ExternalSync).to exist(source: 'clearbit', object: 'Organization', o_id: customer.organization.id)
 
       expect(customer.organization).to have_attributes(
         name: 'Clearbit',
@@ -417,7 +417,7 @@ RSpec.describe 'Clearbit', aggregate_failures: true, current_user_id: 1, integra
     end
 
     it 'Limits enrichment data to database limit' do
-      expect(ExternalSync).to be_exist(source: 'clearbit', object: 'User', o_id: customer.id)
+      expect(ExternalSync).to exist(source: 'clearbit', object: 'User', o_id: customer.id)
 
       expect(customer.test_input).to eq 'Sm'
     end

+ 1 - 1
spec/jobs/concerns/has_active_job_lock_spec.rb

@@ -40,7 +40,7 @@ RSpec.describe HasActiveJobLock, type: :job do
 
       before { job_class.perform_later }
 
-      it "won't enqueue perform_later jobs" do
+      it 'does not enqueue perform_later jobs' do
         expect { job_class.perform_later }.not_to have_enqueued_job(job_class)
       end
 

+ 1 - 1
spec/lib/excel_sheet/ticket_spec.rb

@@ -25,7 +25,7 @@ RSpec.describe ExcelSheet::Ticket do
     end
 
     it 'all elements have width attribute' do
-      expect(instance.ticket_header).to be_all(have_key(:width))
+      expect(instance.ticket_header).to all(have_key(:width))
     end
   end
 end

+ 1 - 1
spec/lib/secure_mailing/smime_spec.rb

@@ -457,7 +457,7 @@ RSpec.describe SecureMailing::SMIME do
               stub_const('SecureMailing::SMIME::Incoming::OPENSSL_PKCS7_VERIFY_FLAGS', OpenSSL::PKCS7::NOVERIFY)
             end
 
-            it "won't perform verification" do
+            it 'does not perform verification' 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 eq('The certificate for verification could not be found.')

+ 2 - 2
spec/models/channel/email_parser_spec.rb

@@ -154,8 +154,8 @@ RSpec.describe Channel::EmailParser, type: :model do
             From: john.doe@xn--cme-pla.corp
             To: jane.doe@xn--cme-pla.corp
           RAW
-          expect(User).to be_exist(login: 'john.doe@äcme.corp')
-            .and(be_exist(email: 'jane.doe@äcme.corp'))
+          expect(User).to exist(login: 'john.doe@äcme.corp')
+            .and(exist(email: 'jane.doe@äcme.corp'))
         end
       end
 

Some files were not shown because too many files changed in this diff