Commit 05e0c8ab authored by Małgorzata Ksionek's avatar Małgorzata Ksionek Committed by Jan Provaznik

Update factory call

parent 98c93037
......@@ -714,7 +714,7 @@ RSpec.describe Group do
context 'with `minimal_access_role` licensed' do
before do
stub_licensed_features(minimal_access_role: true)
create(:group_member, :minimal_access, user: user, group: group)
create(:group_member, :minimal_access, user: user, source: group)
end
context 'when group is a subgroup' do
......
......@@ -16,7 +16,7 @@ RSpec.describe GroupMembersFinder, '#execute' do
member1 = group.add_maintainer(user1)
member2 = group.add_maintainer(user2)
member3 = group.add_maintainer(user3)
create(:group_member, :minimal_access, user: create(:user), group: group)
create(:group_member, :minimal_access, user: create(:user), source: group)
result = described_class.new(group).execute
......
......@@ -153,7 +153,7 @@ RSpec.describe GroupsFinder do
context 'being minimal access member of parent group' do
it 'do not return group with minimal_access access' do
create(:group_member, :minimal_access, user: user, group: parent_group)
create(:group_member, :minimal_access, user: user, source: parent_group)
is_expected.to contain_exactly(public_subgroup, internal_subgroup)
end
......
......@@ -50,7 +50,7 @@ RSpec.describe MembersFinder, '#execute' do
member1 = group.add_maintainer(user2)
member2 = nested_group.add_maintainer(user3)
member3 = project.add_maintainer(user4)
create(:group_member, :minimal_access, user: create(:user), group: group)
create(:group_member, :minimal_access, user: create(:user), source: group)
result = described_class.new(project, user2).execute
......
......@@ -125,7 +125,7 @@ RSpec.describe Gitlab::ProjectAuthorizations do
let!(:group_project) { create(:project, namespace: group) }
before do
create(:group_member, :minimal_access, user: user, group: group)
create(:group_member, :minimal_access, user: user, source: group)
end
it 'does not create authorization' do
......@@ -138,7 +138,7 @@ RSpec.describe Gitlab::ProjectAuthorizations do
let!(:sub_group_project) { create(:project, namespace: sub_group) }
before do
create(:group_member, :minimal_access, user: user, group: group)
create(:group_member, :minimal_access, user: user, source: group)
end
it 'does not create authorization' do
......@@ -152,7 +152,7 @@ RSpec.describe Gitlab::ProjectAuthorizations do
before do
create(:group_group_link, shared_group: shared_group, shared_with_group: group)
create(:group_member, :minimal_access, user: user, group: group)
create(:group_member, :minimal_access, user: user, source: group)
end
it 'does not create authorization' do
......@@ -166,7 +166,7 @@ RSpec.describe Gitlab::ProjectAuthorizations do
before do
create(:project_group_link, group: group, project: shared_project)
create(:group_member, :minimal_access, user: user, group: group)
create(:group_member, :minimal_access, user: user, source: group)
end
it 'does not create authorization' do
......
......@@ -692,7 +692,7 @@ RSpec.describe Group do
before do
create(:group_member, user: user, group: group_parent, access_level: parent_group_access_level)
create(:group_member, user: user, group: group, access_level: group_access_level)
create(:group_member, :minimal_access, user: create(:user), group: group)
create(:group_member, :minimal_access, user: create(:user), source: group)
create(:group_member, user: user, group: group_child, access_level: child_group_access_level)
end
......
......@@ -149,7 +149,7 @@ RSpec.describe Member do
accepted_request_user = create(:user).tap { |u| project.request_access(u) }
@accepted_request_member = project.requesters.find_by(user_id: accepted_request_user.id).tap { |m| m.accept_request }
@member_with_minimal_access = create(:group_member, :minimal_access, group: group)
@member_with_minimal_access = create(:group_member, :minimal_access, source: group)
end
describe '.access_for_user_ids' do
......
......@@ -81,7 +81,7 @@ RSpec.describe AuthorizedProjectUpdate::ProjectCreateService do
before do
create(:group_member, access_level: Gitlab::Access::REPORTER, group: group, user: group_user)
create(:group_member, access_level: Gitlab::Access::MAINTAINER, group: shared_with_group, user: group_user)
create(:group_member, :minimal_access, group: shared_with_group, user: create(:user))
create(:group_member, :minimal_access, source: shared_with_group, user: create(:user))
create(:group_group_link, shared_group: group, shared_with_group: shared_with_group, group_access: Gitlab::Access::DEVELOPER)
......@@ -126,7 +126,7 @@ RSpec.describe AuthorizedProjectUpdate::ProjectCreateService do
context 'member with minimal access' do
before do
create(:group_member, :minimal_access, user: group_user, group: group)
create(:group_member, :minimal_access, user: group_user, source: group)
end
it 'does not create project authorization' do
......
......@@ -114,7 +114,7 @@ RSpec.describe AuthorizedProjectUpdate::ProjectGroupLinkCreateService do
context 'minimal access member' do
before do
create(:group_member, :minimal_access, user: group_user, group: group)
create(:group_member, :minimal_access, user: group_user, source: group)
end
it 'does not create project authorization' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment