2019-07-31 22:56:46 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe UserProjectAccessChangedService do
|
|
|
|
describe '#execute' do
|
|
|
|
it 'schedules the user IDs' do
|
2017-09-10 17:25:29 +05:30
|
|
|
expect(AuthorizedProjectsWorker).to receive(:bulk_perform_and_wait)
|
|
|
|
.with([[1], [2]])
|
2017-08-17 22:00:37 +05:30
|
|
|
|
|
|
|
described_class.new([1, 2]).execute
|
|
|
|
end
|
2018-03-17 18:26:18 +05:30
|
|
|
|
|
|
|
it 'permits non-blocking operation' do
|
|
|
|
expect(AuthorizedProjectsWorker).to receive(:bulk_perform_async)
|
|
|
|
.with([[1], [2]])
|
|
|
|
|
|
|
|
described_class.new([1, 2]).execute(blocking: false)
|
|
|
|
end
|
2017-08-17 22:00:37 +05:30
|
|
|
end
|
|
|
|
end
|