Skip to content

Commit

Permalink
Added atlas test wipe before rspec suite
Browse files Browse the repository at this point in the history
  • Loading branch information
dgcliff committed Aug 28, 2024
1 parent 2a792ed commit d94deb6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.6.25
2.6.26
3 changes: 3 additions & 0 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ test:
<<: *default
database: cerberus_test

atlas_test:
<<: *default
database: atlas_test
# As with config/credentials.yml, you never want to store sensitive information,
# like your database password, in your source code. If your source code is
# ever seen by anyone, they now have access to your database.
Expand Down
7 changes: 6 additions & 1 deletion spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@
end
RSpec.configure do |config|
config.before(:suite) do
# TODO: Atlas wipe
# TODO: Atlas wipe <- fixed! with below
DatabaseCleaner[:active_record, db: :atlas_test].strategy = :deletion
DatabaseCleaner[:active_record, db: :atlas_test].clean
c = RSolr.connect(:url => 'http://solr:8983/solr/blacklight-test')
c.delete_by_query '*:*'
c.commit
end

config.include Devise::Test::ControllerHelpers, type: :controller
Expand Down

0 comments on commit d94deb6

Please sign in to comment.