mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-01 20:48:23 +08:00
Fix codestyle
This commit is contained in:
parent
f9f9bcac9f
commit
07c8c448d5
1 changed files with 14 additions and 15 deletions
|
@ -156,16 +156,15 @@ RSpec.describe 'Api::V1::InventoryItemsController', type: :request do
|
||||||
hash_body = nil
|
hash_body = nil
|
||||||
updated_inventory_item = @inventory_item.as_json[:included]
|
updated_inventory_item = @inventory_item.as_json[:included]
|
||||||
updated_inventory_item.each do |cell|
|
updated_inventory_item.each do |cell|
|
||||||
attributes = cell[:attributes]
|
attributes = cell[:attributes]
|
||||||
if attributes[:value_type] == 'list'
|
if attributes[:value_type] == 'list'
|
||||||
cell[:attributes] = {
|
cell[:attributes] = {
|
||||||
value_type: 'list',
|
value_type: 'list',
|
||||||
value: Faker::Name.unique.name,
|
value: Faker::Name.unique.name,
|
||||||
column_id: 2
|
column_id: 2
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
puts updated_inventory_item
|
|
||||||
patch api_v1_team_inventory_item_path(
|
patch api_v1_team_inventory_item_path(
|
||||||
id: RepositoryRow.last.id,
|
id: RepositoryRow.last.id,
|
||||||
team_id: @teams.first.id,
|
team_id: @teams.first.id,
|
||||||
|
@ -181,11 +180,11 @@ RSpec.describe 'Api::V1::InventoryItemsController', type: :request do
|
||||||
hash_body = nil
|
hash_body = nil
|
||||||
updated_inventory_item = @inventory_item.as_json[:included]
|
updated_inventory_item = @inventory_item.as_json[:included]
|
||||||
updated_inventory_item.each do |cell|
|
updated_inventory_item.each do |cell|
|
||||||
attributes = cell[:attributes]
|
attributes = cell[:attributes]
|
||||||
if attributes[:value_type] == 'text'
|
if attributes[:value_type] == 'text'
|
||||||
attributes[:value] = Faker::Name.unique.name
|
attributes[:value] = Faker::Name.unique.name
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
patch api_v1_team_inventory_item_path(
|
patch api_v1_team_inventory_item_path(
|
||||||
id: RepositoryRow.last.id,
|
id: RepositoryRow.last.id,
|
||||||
team_id: @teams.first.id,
|
team_id: @teams.first.id,
|
||||||
|
|
Loading…
Reference in a new issue