Fix RSpec/VerifiedDoubles
cop (#25469)
This commit is contained in:
@@ -11,7 +11,7 @@ describe FeedInsertWorker do
|
||||
|
||||
context 'when there are no records' do
|
||||
it 'skips push with missing status' do
|
||||
instance = double(push_to_home: nil)
|
||||
instance = instance_double(FeedManager, push_to_home: nil)
|
||||
allow(FeedManager).to receive(:instance).and_return(instance)
|
||||
result = subject.perform(nil, follower.id)
|
||||
|
||||
@@ -20,7 +20,7 @@ describe FeedInsertWorker do
|
||||
end
|
||||
|
||||
it 'skips push with missing account' do
|
||||
instance = double(push_to_home: nil)
|
||||
instance = instance_double(FeedManager, push_to_home: nil)
|
||||
allow(FeedManager).to receive(:instance).and_return(instance)
|
||||
result = subject.perform(status.id, nil)
|
||||
|
||||
@@ -31,7 +31,7 @@ describe FeedInsertWorker do
|
||||
|
||||
context 'when there are real records' do
|
||||
it 'skips the push when there is a filter' do
|
||||
instance = double(push_to_home: nil, filter?: true)
|
||||
instance = instance_double(FeedManager, push_to_home: nil, filter?: true)
|
||||
allow(FeedManager).to receive(:instance).and_return(instance)
|
||||
result = subject.perform(status.id, follower.id)
|
||||
|
||||
@@ -40,7 +40,7 @@ describe FeedInsertWorker do
|
||||
end
|
||||
|
||||
it 'pushes the status onto the home timeline without filter' do
|
||||
instance = double(push_to_home: nil, filter?: false)
|
||||
instance = instance_double(FeedManager, push_to_home: nil, filter?: false)
|
||||
allow(FeedManager).to receive(:instance).and_return(instance)
|
||||
result = subject.perform(status.id, follower.id)
|
||||
|
||||
|
Reference in New Issue
Block a user