Fix failing tests [SCI-2614][SCI-2616][SCI-2617]

This commit is contained in:
Oleksii Kriuchykhin 2018-08-07 16:02:14 +02:00
parent 4df9a4c9ca
commit 6c59e1e159
3 changed files with 5 additions and 13 deletions

View file

@ -8,25 +8,25 @@ class RepositoryCell < ActiveRecord::Base
dependent: :destroy
belongs_to :repository_text_value,
(lambda do
joins(:repository_cell)
includes(:repository_cell)
.where(repository_cells: { value_type: 'RepositoryTextValue' })
end),
optional: true, foreign_key: :value_id
belongs_to :repository_date_value,
(lambda do
joins(:repository_cell)
includes(:repository_cell)
.where(repository_cells: { value_type: 'RepositoryDateValue' })
end),
optional: true, foreign_key: :value_id
belongs_to :repository_list_value,
(lambda do
joins(:repository_cell)
includes(:repository_cell)
.where(repository_cells: { value_type: 'RepositoryListValue' })
end),
optional: true, foreign_key: :value_id
belongs_to :repository_asset_value,
(lambda do
joins(:repository_cell)
includes(:repository_cell)
.where(repository_cells: { value_type: 'RepositoryAssetValue' })
end),
optional: true, foreign_key: :value_id

View file

@ -71,14 +71,6 @@ RSpec.configure do |config|
DatabaseCleaner.clean
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

View file

@ -70,7 +70,7 @@ RSpec.describe 'Api::V1::InventoryItemsController', type: :request do
)
end
it 'Response with correct inventory items, 30 per page' do
it 'Response with correct inventory items, 100 per page' do
hash_body = nil
get api_v1_team_inventory_items_path(
team_id: @teams.first.id,