diff options
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/fetch_webfinger_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/workers/fetch_webfinger_spec.rb b/spec/workers/fetch_webfinger_spec.rb index cfa83b24a..0a9469c75 100644 --- a/spec/workers/fetch_webfinger_spec.rb +++ b/spec/workers/fetch_webfinger_spec.rb @@ -3,7 +3,7 @@ require "spec_helper" describe Workers::FetchWebfinger do it "should webfinger and queue a job to fetch public posts" do @person = FactoryGirl.create(:person) - allow(Webfinger).to receive(:new).and_return(double(fetch: @person)) + allow(Person).to receive(:find_or_fetch_by_identifier).and_return(@person) expect(Diaspora::Fetcher::Public).to receive(:queue_for).exactly(1).times @@ -11,7 +11,7 @@ describe Workers::FetchWebfinger do end it "should webfinger and queue no job to fetch public posts if the person is not found" do - allow(Webfinger).to receive(:new).and_return(double(fetch: nil)) + allow(Person).to receive(:find_or_fetch_by_identifier).and_return(nil) expect(Diaspora::Fetcher::Public).not_to receive(:queue_for) |