mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-26 17:51:47 +08:00
Fix failing tests [SCI-2611][SCI-2612]
This commit is contained in:
parent
22e12d8fc3
commit
298b866df4
4 changed files with 15 additions and 1 deletions
|
@ -173,6 +173,7 @@ module Tasks
|
|||
LEFT OUTER JOIN sample_groups
|
||||
ON samples.sample_group_id = sample_groups.id
|
||||
WHERE samples.team_id = #{team.id}
|
||||
ORDER BY samples.id
|
||||
SQL
|
||||
|
||||
ActiveRecord::Base.connection.execute(samples_sql).to_a
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
Kaminari.configure do |config|
|
||||
config.default_per_page = 10
|
||||
# config.max_per_page = nil
|
||||
|
|
|
@ -2,7 +2,7 @@ FactoryBot.define do
|
|||
factory :user do
|
||||
full_name 'admin'
|
||||
initials 'AD'
|
||||
email 'admin_test@scinote.net'
|
||||
email Faker::Internet.unique.email
|
||||
password 'asdf1243'
|
||||
password_confirmation 'asdf1243'
|
||||
current_sign_in_at DateTime.now
|
||||
|
|
|
@ -59,6 +59,18 @@ RSpec.configure do |config|
|
|||
DatabaseCleaner.clean
|
||||
end
|
||||
|
||||
config.before(:all) do
|
||||
DatabaseCleaner.strategy = :transaction
|
||||
end
|
||||
|
||||
config.before(:all) do
|
||||
DatabaseCleaner.start
|
||||
end
|
||||
|
||||
config.after(:all) do
|
||||
DatabaseCleaner.clean
|
||||
end
|
||||
|
||||
config.around(:each, type: :background_job) do |example|
|
||||
run_background_jobs_immediately do
|
||||
example.run
|
||||
|
|
Loading…
Reference in a new issue