about summary refs log tree commit diff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/feed_manager_spec.rb4
-rw-r--r--spec/lib/spam_check_spec.rb8
-rw-r--r--spec/services/unallow_domain_service_spec.rb6
-rw-r--r--spec/workers/scheduler/feed_cleanup_scheduler_spec.rb4
4 files changed, 11 insertions, 11 deletions
diff --git a/spec/lib/feed_manager_spec.rb b/spec/lib/feed_manager_spec.rb
index 40e8214b6..bb5bdfdc5 100644
--- a/spec/lib/feed_manager_spec.rb
+++ b/spec/lib/feed_manager_spec.rb
@@ -448,7 +448,7 @@ RSpec.describe FeedManager do
       FeedManager.instance.push_to_home(receiver, another_status)
 
       # We should have a tracking set and an entry in reblogs.
-      expect(Redis.current.exists(reblog_set_key)).to be true
+      expect(Redis.current.exists?(reblog_set_key)).to be true
       expect(Redis.current.zrange(reblogs_key, 0, -1)).to eq [reblogged.id.to_s]
 
       # Push everything off the end of the feed.
@@ -461,7 +461,7 @@ RSpec.describe FeedManager do
       FeedManager.instance.trim('home', receiver.id)
 
       # We should not have any reblog tracking data.
-      expect(Redis.current.exists(reblog_set_key)).to be false
+      expect(Redis.current.exists?(reblog_set_key)).to be false
       expect(Redis.current.zrange(reblogs_key, 0, -1)).to be_empty
     end
   end
diff --git a/spec/lib/spam_check_spec.rb b/spec/lib/spam_check_spec.rb
index d4d66a499..159d83257 100644
--- a/spec/lib/spam_check_spec.rb
+++ b/spec/lib/spam_check_spec.rb
@@ -150,9 +150,9 @@ RSpec.describe SpamCheck do
     let(:redis_key) { spam_check.send(:redis_key) }
 
     it 'remembers' do
-      expect(Redis.current.exists(redis_key)).to be true
+      expect(Redis.current.exists?(redis_key)).to be true
       spam_check.remember!
-      expect(Redis.current.exists(redis_key)).to be true
+      expect(Redis.current.exists?(redis_key)).to be true
     end
   end
 
@@ -166,9 +166,9 @@ RSpec.describe SpamCheck do
     end
 
     it 'resets' do
-      expect(Redis.current.exists(redis_key)).to be true
+      expect(Redis.current.exists?(redis_key)).to be true
       spam_check.reset!
-      expect(Redis.current.exists(redis_key)).to be false
+      expect(Redis.current.exists?(redis_key)).to be false
     end
   end
 
diff --git a/spec/services/unallow_domain_service_spec.rb b/spec/services/unallow_domain_service_spec.rb
index 559e152fb..b93945b9a 100644
--- a/spec/services/unallow_domain_service_spec.rb
+++ b/spec/services/unallow_domain_service_spec.rb
@@ -55,9 +55,9 @@ RSpec.describe UnallowDomainService, type: :service do
       end
 
       it 'removes the remote accounts\'s statuses and media attachments' do
-        expect { bad_status1.reload }.to_not raise_exception ActiveRecord::RecordNotFound
-        expect { bad_status2.reload }.to_not raise_exception ActiveRecord::RecordNotFound
-        expect { bad_attachment.reload }.to_not raise_exception ActiveRecord::RecordNotFound
+        expect { bad_status1.reload }.to_not raise_error
+        expect { bad_status2.reload }.to_not raise_error
+        expect { bad_attachment.reload }.to_not raise_error
       end
     end
   end
diff --git a/spec/workers/scheduler/feed_cleanup_scheduler_spec.rb b/spec/workers/scheduler/feed_cleanup_scheduler_spec.rb
index 7fae680ba..914eed829 100644
--- a/spec/workers/scheduler/feed_cleanup_scheduler_spec.rb
+++ b/spec/workers/scheduler/feed_cleanup_scheduler_spec.rb
@@ -16,8 +16,8 @@ describe Scheduler::FeedCleanupScheduler do
 
     expect(Redis.current.zcard(feed_key_for(inactive_user))).to eq 0
     expect(Redis.current.zcard(feed_key_for(active_user))).to eq 1
-    expect(Redis.current.exists(feed_key_for(inactive_user, 'reblogs'))).to be false
-    expect(Redis.current.exists(feed_key_for(inactive_user, 'reblogs:2'))).to be false
+    expect(Redis.current.exists?(feed_key_for(inactive_user, 'reblogs'))).to be false
+    expect(Redis.current.exists?(feed_key_for(inactive_user, 'reblogs:2'))).to be false
   end
 
   def feed_key_for(user, subtype = nil)