Truncate the DB in after(:all) test for Gitlab::ImportExport::ProjectTreeRestorer
Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
parent
097924cf05
commit
bce00bad77
2 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue