Browse Source

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)
Martin Gruner 3 years ago
parent
commit
563d2d1e3d

+ 5 - 5
Gemfile.lock

@@ -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)

+ 1 - 1
spec/db/migrate/issue_3567_auto_assignment_spec.rb

@@ -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

+ 1 - 1
spec/db/migrate/issue_3617_user_image_source_fix_spec.rb

@@ -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
 

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

@@ -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

+ 2 - 2
spec/lib/import/otrs/article_customer_spec.rb

@@ -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

+ 1 - 1
spec/lib/ldap/group_spec.rb

@@ -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
 

+ 3 - 3
spec/lib/ldap/user_spec.rb

@@ -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

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

@@ -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

+ 8 - 8
spec/lib/sessions/backend/ticket_overview_list_spec.rb

@@ -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 user’s 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 user’s id' do

+ 4 - 4
spec/lib/sessions/event/chat_session_start_spec.rb

@@ -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)
 

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