user_project_access_changed_service_spec.rb 497 字节
Newer Older
1 2 3 4 5
require 'spec_helper'

describe UserProjectAccessChangedService do
  describe '#execute' do
    it 'schedules the user IDs' do
6 7
      expect(AuthorizedProjectsWorker).to receive(:bulk_perform_and_wait)
        .with([[1], [2]])
8 9 10

      described_class.new([1, 2]).execute
    end
11 12 13 14 15 16 17

    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
18 19
  end
end