group_order_article_spec: add updates quantity tolerance test
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
2bcb953496
commit
9b68f75665
1 changed files with 9 additions and 0 deletions
|
@ -40,6 +40,15 @@ describe GroupOrderArticle do
|
|||
goa.update_quantities(0, 0)
|
||||
expect(GroupOrderArticle.exists?(goa.id)).to be false
|
||||
end
|
||||
|
||||
it 'updates quantity and tolerance' do
|
||||
goa.update_quantities(2,2)
|
||||
goa.update_quantities(1,1)
|
||||
expect(goa.quantity).to eq(1)
|
||||
expect(goa.tolerance).to eq(1)
|
||||
goa.update_quantities(1,2)
|
||||
expect(goa.tolerance).to eq(2)
|
||||
end
|
||||
end
|
||||
|
||||
describe 'distribution strategy' do
|
||||
|
|
Loading…
Reference in a new issue