Welcome to mirror list, hosted at ThFree Co, Russian Federation.

receive_local_batch_spec.rb « workers « spec - github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: acd841cf3101e303401e9a0fb185fbca3f62fe59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require "spec_helper"

describe Workers::ReceiveLocalBatch do
  it "calls the postzord" do
    post = double
    allow(Post).to receive(:find).with(1).and_return(post)

    zord = double
    expect(Postzord::Receiver::LocalBatch).to receive(:new).with(post, [2]).and_return(zord)
    expect(zord).to receive(:perform!)

    Workers::ReceiveLocalBatch.new.perform("Post", 1, [2])
  end
end