Commit 34fefa81 authored by Rubén Dávila's avatar Rubén Dávila
Browse files

Backport changes from spec/migrations/clean_up_for_members_spec.rb

parent 7bf26235
......@@ -3,6 +3,7 @@
describe CleanUpForMembers, :migration do
let(:migration) { described_class.new }
let(:groups) { table(:namespaces) }
let!(:group_member) { create_group_member }
let!(:unbinded_group_member) { create_group_member }
let!(:invited_group_member) { create_group_member(true) }
......@@ -25,7 +26,7 @@
end
def create_group_member(invited = false)
fill_member(GroupMember.new(group: create_group), invited)
fill_member(GroupMember.new(source_id: create_group.id, source_type: 'Namespace'), invited)
end
def create_project_member(invited = false)
......@@ -54,7 +55,7 @@ def fill_member(member_object, invited)
def create_group
name = FFaker::Lorem.characters(10)
Group.create(name: name, path: name.downcase.gsub(/\s/, '_'))
groups.create!(type: 'Group', name: name, path: name.downcase.gsub(/\s/, '_'))
end
def create_project
......
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