Maintenance: Fixed data leaking test by migrating to db_strategy: :reset from use_transactional_tests.

This commit is contained in:
Thorsten Eckel 2020-11-23 10:51:09 +01:00
parent b930827b77
commit e474539f55

View file

@ -3,8 +3,6 @@ require 'rails_helper'
RSpec.describe NotificationFactory::Renderer do
# rubocop:disable Lint/InterpolationCheck
describe 'render' do
self.use_transactional_tests = false
before { @user = User.where(firstname: 'Nicole').first }
it 'correctly renders a blank template' do
@ -31,6 +29,8 @@ RSpec.describe NotificationFactory::Renderer do
ticket.destroy
end
context 'when handling ObjectManager::Attribute usage', db_strategy: :reset do
it 'correctly renders simple select attributes' do
create :object_manager_attribute_select, name: 'select'
ObjectManager::Attribute.migration_execute
@ -145,5 +145,6 @@ RSpec.describe NotificationFactory::Renderer do
ObjectManager::Attribute.migration_execute
end
end
end
# rubocop:enable Lint/InterpolationCheck
end