Commit 680915d2 authored by James Lopez's avatar James Lopez

revert back spec change and use a different cleanup strategy for spec that was...

revert back spec change and use a different cleanup strategy for spec that was forcing a transaction commit
parent 626c73d5
...@@ -55,6 +55,10 @@ describe DestroyGroupService, services: true do ...@@ -55,6 +55,10 @@ describe DestroyGroupService, services: true do
context 'potential race conditions' do context 'potential race conditions' do
context "when the `GroupDestroyWorker` task runs immediately" do context "when the `GroupDestroyWorker` task runs immediately" do
before do
DatabaseCleaner.strategy = :deletion
end
it "deletes the group" do it "deletes the group" do
# Commit the contents of this spec's transaction so far # Commit the contents of this spec's transaction so far
# so subsequent db connections can see it. # so subsequent db connections can see it.
......
require 'spec_helper' require 'spec_helper'
describe AdminEmailsWorker do describe AdminEmailsWorker do
include EmailHelpers
context "recipients" do context "recipients" do
let(:group) { create :group } let(:group) { create :group }
let(:project) { create :project } let(:project) { create :project }
...@@ -20,7 +18,7 @@ describe AdminEmailsWorker do ...@@ -20,7 +18,7 @@ describe AdminEmailsWorker do
blocked_user = create(:user, state: :blocked) blocked_user = create(:user, state: :blocked)
group.add_user(blocked_user, Gitlab::Access::DEVELOPER) group.add_user(blocked_user, Gitlab::Access::DEVELOPER)
project.add_user(blocked_user, Gitlab::Access::DEVELOPER) project.add_user(blocked_user, Gitlab::Access::DEVELOPER)
reset_delivered_emails! ActionMailer::Base.deliveries = []
end end
context "sending emails to members of a group only" do context "sending emails to members of a group only" 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