Skip to content
Snippets Groups Projects
Commit 54683295 authored by sameer shaik's avatar sameer shaik
Browse files

Test api delete action for trial groups

parent 50463e9f
No related branches found
No related tags found
1 merge request!101398Exclude trial groups from delete checks
......@@ -1146,6 +1146,16 @@
expect(subgroup.marked_for_deletion_on).to eq(Date.current)
expect(subgroup.deleting_user).to eq(user)
end
it 'marks for deletion of a group with a trial plan', :saas do
create(:gitlab_subscription, :ultimate_trial, trial: true, namespace: group)
delete api("/groups/#{group.id}", user)
expect(response).to have_gitlab_http_status(:accepted)
expect(group.marked_for_deletion_on).to eq(Date.current)
expect(group.deleting_user).to eq(user)
end
end
context 'feature is not available' do
......@@ -1170,6 +1180,13 @@
expect { delete api("/groups/#{subgroup.id}", user) }.to change(GroupDestroyWorker.jobs, :size).by(1)
expect(response).to have_gitlab_http_status(:accepted)
end
it 'deletes a group with a trial plan', :saas do
create(:gitlab_subscription, :ultimate_trial, trial: true, namespace: group)
expect { delete api("/groups/#{group.id}", user) }.to change(GroupDestroyWorker.jobs, :size).by(1)
expect(response).to have_gitlab_http_status(:accepted)
end
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment