diaspora/spec/models/jobs/update_service_users_spec.rb

18 lines
488 B
Ruby

require 'spec_helper'
describe Jobs::UpdateServiceUsers do
before do
@user = alice
@post = @user.post(:status_message, :text => "hello", :to =>@user.aspects.first.id)
@service = Services::Facebook.new(:access_token => "yeah")
@user.services << @service
end
it 'calls the update_friends for the service' do
Service.stub!(:find).and_return(@service)
@service.should_receive(:save_friends)
Jobs::UpdateServiceUsers.perform(@service.id)
end
end