mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 02:05:57 +02:00
Set db cleaning strategy to truncation when running epp tests
This commit is contained in:
parent
b377fda73f
commit
120538bfed
6 changed files with 37 additions and 11 deletions
|
@ -17,7 +17,6 @@ describe 'EPP Session', type: :epp do
|
|||
|
||||
it 'logs in epp user' do
|
||||
response = Nokogiri::XML(server.send_request(read_body('login.xml')))
|
||||
|
||||
result = response.css('epp response result').first
|
||||
expect(result[:code]).to eq('1000')
|
||||
|
||||
|
|
|
@ -25,7 +25,27 @@ RSpec.configure do |config|
|
|||
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
||||
# examples within a transaction, remove the following line or assign false
|
||||
# instead of true.
|
||||
config.use_transactional_fixtures = true
|
||||
config.use_transactional_fixtures = false
|
||||
|
||||
config.before(:suite) do
|
||||
DatabaseCleaner.clean_with(:truncation)
|
||||
end
|
||||
|
||||
config.before(:each) do
|
||||
DatabaseCleaner.strategy = :transaction
|
||||
end
|
||||
|
||||
config.before(:each, type: :epp) do
|
||||
DatabaseCleaner.strategy = :truncation
|
||||
end
|
||||
|
||||
config.before(:each) do
|
||||
DatabaseCleaner.start
|
||||
end
|
||||
|
||||
config.after(:each) do
|
||||
DatabaseCleaner.clean
|
||||
end
|
||||
|
||||
# RSpec Rails can automatically mix in different behaviours to your tests
|
||||
# based on their file location, for example enabling you to call `get` and
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue