Skip to content

Commit

Permalink
update spec files
Browse files Browse the repository at this point in the history
  • Loading branch information
nabeta committed Dec 30, 2019
1 parent cfda4ec commit 73b21b2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
29 changes: 15 additions & 14 deletions spec/fixtures/shelves.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
---
shelf_00001:
name: web
display_name_translations: {"en": "Library bookmark", "ja": "ブックマーク"}
display_name: Library bookmark
id: 1
note:
library_id: 1
position: 1
shelf_00002:
name: first_shelf
display_name_translations: {"en": "First shelf", "ja": "最初の書棚"}
display_name: First shelf
id: 2
note:
library_id: 2
position: 2
shelf_00003:
name: second_shelf
display_name_translations: {"en": "Second shelf", "ja": "二つ目の書棚"}
display_name: Second shelf
id: 3
note:
library_id: 2
position: 3
shelf_00004:
name: third_shelf
display_name_translations: {"en": "Third shelf", "ja": "三つ目の書棚"}
display_name: Third shelf
id: 4
note:
library_id: 3
Expand All @@ -32,14 +32,15 @@ shelf_00004:
#
# Table name: shelves
#
# id :bigint not null, primary key
# name :string not null
# note :text
# library_id :bigint not null
# items_count :integer default(0), not null
# position :integer
# created_at :datetime not null
# updated_at :datetime not null
# closed :boolean default(FALSE), not null
# display_name_translations :jsonb not null
# id :integer not null, primary key
# name :string not null
# display_name :text
# note :text
# library_id :integer not null
# items_count :integer default(0), not null
# position :integer
# created_at :datetime
# updated_at :datetime
# deleted_at :datetime
# closed :boolean default(FALSE), not null
#
2 changes: 1 addition & 1 deletion spec/models/inventory_file_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
fixtures :users

before(:each) do
@file = InventoryFile.new inventory: File.new("#{Rails.root.to_s}/../../examples/inventory_file_sample.tsv")
@file = InventoryFile.new inventory: File.new("#{Rails.root.to_s}/../../examples/inventory_file_sample.tsv", shelf: Shelf.find_by(name: 'first_shelf'))
@file.user = users(:admin)
@file.save
end
Expand Down

0 comments on commit 73b21b2

Please sign in to comment.