Merge branch 'rc/backport-ee-fix' into 'master'

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

See merge request !9339
This commit is contained in:
Robert Speicher 2017-02-17 19:20:40 +00:00
commit 1fd90ef553
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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