Fix failing tests [SCI-2611][SCI-2612]

This commit is contained in:
Oleksii Kriuchykhin 2018-08-07 14:52:30 +02:00
parent 22e12d8fc3
commit 298b866df4
4 changed files with 15 additions and 1 deletions

View file

@ -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

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true
Kaminari.configure do |config|
config.default_per_page = 10
# config.max_per_page = nil

View file

@ -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

View file

@ -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