debian-mirror-gitlab/spec/services/members/groups/creator_service_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
864 B
Ruby
Raw Normal View History

2021-09-30 23:02:18 +05:30
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Members::Groups::CreatorService do
describe '.access_levels' do
it 'returns Gitlab::Access.options_with_owner' do
expect(described_class.access_levels).to eq(Gitlab::Access.sym_options_with_owner)
end
end
2022-07-16 23:28:13 +05:30
describe '#execute' do
let_it_be(:source, reload: true) { create(:group, :public) }
let_it_be(:user) { create(:user) }
it_behaves_like 'member creation' do
let_it_be(:member_type) { GroupMember }
end
context 'authorized projects update' do
it 'schedules a single project authorization update job when called multiple times' do
expect(AuthorizedProjectsWorker).to receive(:bulk_perform_and_wait).once
1.upto(3) do
described_class.new(source, user, :maintainer).execute
end
end
end
end
2021-09-30 23:02:18 +05:30
end