diff options
Diffstat (limited to 'spec/support')
| -rw-r--r-- | spec/support/fake_iev_server.rb | 15 | ||||
| -rw-r--r-- | spec/support/referential.rb | 8 |
2 files changed, 7 insertions, 16 deletions
diff --git a/spec/support/fake_iev_server.rb b/spec/support/fake_iev_server.rb index c311fdc91..8cd002fae 100644 --- a/spec/support/fake_iev_server.rb +++ b/spec/support/fake_iev_server.rb @@ -10,17 +10,11 @@ end # Importer ############ # get list -fixture_request :get, - "http://#{Rails.application.secrets.api_endpoint}referentials/test/scheduled_jobs?action=importer", - 'scheduled_jobs.json' +fixture_request :get, "#{Rails.application.secrets.api_endpoint}referentials/test/scheduled_jobs?action=importer", 'scheduled_jobs.json' # get element -fixture_request :get, - "http://#{Rails.application.secrets.api_endpoint}referentials/test/scheduled_jobs/1?action=importer", - 'scheduled_job.json' +fixture_request :get, "#{Rails.application.secrets.api_endpoint}referentials/test/scheduled_jobs/1?action=importer", 'scheduled_job.json' # post element -fixture_request :post, - "http://#{Rails.application.secrets.api_endpoint}referentials/test/scheduled_jobs/", - 'scheduled_job.json' +fixture_request :post, "#{Rails.application.secrets.api_endpoint}referentials/test/scheduled_jobs/", 'scheduled_job.json' # Optionnels # delete element @@ -36,6 +30,3 @@ fixture_request :post, ############ # Validation ############ - - - diff --git a/spec/support/referential.rb b/spec/support/referential.rb index d77a05f41..8c468eb53 100644 --- a/spec/support/referential.rb +++ b/spec/support/referential.rb @@ -12,7 +12,7 @@ module ReferentialHelper end module ClassMethods - + def assign_referential before(:each) do assign :referential, referential @@ -34,7 +34,7 @@ RSpec.configure do |config| config.before(:suite) do # Clean all tables to start - DatabaseCleaner.clean_with :truncation + DatabaseCleaner.clean_with :truncation, except: %w[spatial_ref_sys] # Truncating doesn't drop schemas, ensure we're clean here, first *may not* exist Apartment::Tenant.drop('first') rescue nil # Create the default tenant for our tests @@ -49,7 +49,7 @@ RSpec.configure do |config| end config.before(:each, :js => true) do - DatabaseCleaner.strategy = :truncation + DatabaseCleaner.strategy = :truncation, { except: %w[spatial_ref_sys] } end config.before(:each) do @@ -61,6 +61,6 @@ RSpec.configure do |config| Apartment::Tenant.reset # Rollback transaction DatabaseCleaner.clean - end + end end |
