rosa-build/spec/services/abf_worker_service/container_spec.rb

30 lines
688 B
Ruby
Raw Normal View History

require 'spec_helper'
describe AbfWorkerService::Container do
let(:build_list) { FactoryGirl.build(:build_list, id: 123) }
before do
stub_symlink_methods
end
subject { AbfWorkerService::Container.new(build_list) }
context '#create!' do
it 'creates task' do
2014-06-27 18:06:09 +01:00
expect(build_list).to_not receive(:fail_publish_container)
expect(Resque).to receive(:push)
subject.create!
end
2014-06-27 18:06:09 +01:00
it 'fails when no packages on FS' do
expect(subject).to receive(:filter_build_lists_without_packages).and_return([])
expect(build_list).to receive(:fail_publish_container)
expect(Resque).to_not receive(:push)
subject.create!
end
end
end