Commit bce00bad authored by Rémy Coutable's avatar Rémy Coutable

Truncate the DB in after(:all) test for Gitlab::ImportExport::ProjectTreeRestorer

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 097924cf
......@@ -3,7 +3,7 @@ include ImportExport::CommonUtil
describe Gitlab::ImportExport::ProjectTreeRestorer, services: true do
describe 'restore project tree' do
before(:all) do
before(:context) do
@user = create(:user)
RSpec::Mocks.with_temporary_scope do
......@@ -15,10 +15,6 @@ describe Gitlab::ImportExport::ProjectTreeRestorer, services: true do
end
end
after(:all) do
@user.destroy!
end
context 'JSON' do
it 'restores models based on JSON' do
expect(@restored_project_json).to be true
......
......@@ -3,6 +3,10 @@ RSpec.configure do |config|
DatabaseCleaner.clean_with(:truncation)
end
config.append_after(:context) do
DatabaseCleaner.clean_with(:truncation)
end
config.before(:each) do
DatabaseCleaner.strategy = :transaction
end
......
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