Skip to content

Commit

Permalink
Don't delete Medium table as DatabaseClenaer takes care of it
Browse files Browse the repository at this point in the history
  • Loading branch information
Splines committed May 1, 2024
1 parent 58b28c6 commit 1983c6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 4 additions & 0 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
2 changes: 0 additions & 2 deletions spec/requests/media_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1983c6f

Please sign in to comment.