about summary refs log tree commit diff
path: root/spec/workers/feed_insert_worker_spec.rb
diff options
context:
space:
mode:
authorDavid Yip <yipdw@member.fsf.org>2017-11-17 17:40:00 -0600
committerDavid Yip <yipdw@member.fsf.org>2017-11-17 17:40:00 -0600
commit1ab12ba38ebd42be93b63b7cf0d3c6a81060b741 (patch)
tree3899389c63c16e33dd48fadb270d3259a7c15b67 /spec/workers/feed_insert_worker_spec.rb
parent6f8ccbfcdf7fd8ca651d1583a608e96b25a09e25 (diff)
parent24cafd73a2b644025e9aeaadf4fed46dd3ecea4d (diff)
Merge remote-tracking branch 'origin/master' into merge-upstream
Diffstat (limited to 'spec/workers/feed_insert_worker_spec.rb')
-rw-r--r--spec/workers/feed_insert_worker_spec.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/workers/feed_insert_worker_spec.rb b/spec/workers/feed_insert_worker_spec.rb
index 71a3dea00..3509f1f50 100644
--- a/spec/workers/feed_insert_worker_spec.rb
+++ b/spec/workers/feed_insert_worker_spec.rb
@@ -11,41 +11,41 @@ describe FeedInsertWorker do
 
     context 'when there are no records' do
       it 'skips push with missing status' do
-        instance = double(push: nil)
+        instance = double(push_to_home: nil)
         allow(FeedManager).to receive(:instance).and_return(instance)
         result = subject.perform(nil, follower.id)
 
         expect(result).to eq true
-        expect(instance).not_to have_received(:push)
+        expect(instance).not_to have_received(:push_to_home)
       end
 
       it 'skips push with missing account' do
-        instance = double(push: nil)
+        instance = double(push_to_home: nil)
         allow(FeedManager).to receive(:instance).and_return(instance)
         result = subject.perform(status.id, nil)
 
         expect(result).to eq true
-        expect(instance).not_to have_received(:push)
+        expect(instance).not_to have_received(:push_to_home)
       end
     end
 
     context 'when there are real records' do
       it 'skips the push when there is a filter' do
-        instance = double(push: nil, filter?: true)
+        instance = double(push_to_home: nil, filter?: true)
         allow(FeedManager).to receive(:instance).and_return(instance)
         result = subject.perform(status.id, follower.id)
 
         expect(result).to be_nil
-        expect(instance).not_to have_received(:push)
+        expect(instance).not_to have_received(:push_to_home)
       end
 
       it 'pushes the status onto the home timeline without filter' do
-        instance = double(push: nil, filter?: false)
+        instance = double(push_to_home: nil, filter?: false)
         allow(FeedManager).to receive(:instance).and_return(instance)
         result = subject.perform(status.id, follower.id)
 
         expect(result).to be_nil
-        expect(instance).to have_received(:push).with(:home, follower, status)
+        expect(instance).to have_received(:push_to_home).with(follower, status)
       end
     end
   end