diff options
author | Douwe Maan <douwe@selenight.nl> | 2018-03-07 13:54:28 -0600 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2018-03-07 17:18:01 -0600 |
commit | 74a24a4fab3d8020950ee3da371a432f7361c569 (patch) | |
tree | 87cb63e5f8ee2f45c0bb348be1212af839f3c6b2 /spec/models | |
parent | 6ec655f5c46aab93f435ac9218c7354b0a712160 (diff) | |
download | gitlab-ce-74a24a4fab3d8020950ee3da371a432f7361c569.tar.gz |
Don't delete todos or unassign issues and MRs when a user leaves a projectunassign-when-leaving
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/members/project_member_spec.rb | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/spec/models/members/project_member_spec.rb b/spec/models/members/project_member_spec.rb index 3e46fa36375..b8b0e63f92e 100644 --- a/spec/models/members/project_member_spec.rb +++ b/spec/models/members/project_member_spec.rb @@ -45,14 +45,6 @@ describe ProjectMember do let(:project) { owner.project } let(:master) { create(:project_member, project: project) } - let(:owner_todos) { (0...2).map { create(:todo, user: owner.user, project: project) } } - let(:master_todos) { (0...3).map { create(:todo, user: master.user, project: project) } } - - before do - owner_todos - master_todos - end - it "creates an expired event when left due to expiry" do expired = create(:project_member, project: project, expires_at: Time.now - 6.days) expired.destroy @@ -63,21 +55,6 @@ describe ProjectMember do master.destroy expect(Event.recent.first.action).to eq(Event::LEFT) end - - it "destroys itself and delete associated todos" do - expect(owner.user.todos.size).to eq(2) - expect(master.user.todos.size).to eq(3) - expect(Todo.count).to eq(5) - - master_todo_ids = master_todos.map(&:id) - master.destroy - - expect(owner.user.todos.size).to eq(2) - expect(Todo.count).to eq(2) - master_todo_ids.each do |id| - expect(Todo.exists?(id)).to eq(false) - end - end end describe '.import_team' do |