add migration and adapt fixture and factories
This commit is contained in:
parent
c28731a1ea
commit
ace6551880
4 changed files with 24 additions and 6 deletions
|
|
@ -7,6 +7,7 @@ FactoryBot.define do
|
|||
tax { [6, 21].sample }
|
||||
deposit { rand(10) < 8 ? 0 : [0.0, 0.80, 1.20, 12.00].sample }
|
||||
unit_quantity { rand(5) < 3 ? 1 : rand(1..20) }
|
||||
price_per { rand(0.1..26.0).round(2) }
|
||||
|
||||
factory :article do
|
||||
sequence(:name) { |n| Faker::Lorem.words(number: rand(2..4)).join(' ') + " ##{n}" }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue