diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 1c4c94a3f..202207bd1 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -34,10 +34,14 @@ # For Devise >= 4.1.0 config.include Devise::Test::ControllerHelpers, type: :controller + # 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. + # We set it to false here since we are using the DatabaseCleaner gem instead. + # Also see https://avdi.codes/configuring-database_cleaner-with-rails-rspec-capybara-and-selenium/ config.use_transactional_fixtures = false + # RSpec Rails can automatically mix in different behaviours to your tests # based on their file location, for example enabling you to call `get` and # `post` in specs under `spec/controllers`. diff --git a/spec/requests/media_spec.rb b/spec/requests/media_spec.rb index e17ee4c1c..3aa2ec5fb 100644 --- a/spec/requests/media_spec.rb +++ b/spec/requests/media_spec.rb @@ -15,8 +15,6 @@ def expect_all_results(response) RSpec.describe("Media", type: :request) do describe "#search_by" do before do - Medium.delete_all - @medium1 = FactoryBot.create(:medium, :with_teachable, :with_editors, :released, sort: "Nuesse", description: "Erstes Medium") @medium2 = FactoryBot.create(:medium, :with_teachable, :with_editors, :released,