test Supplier for correct tolerance
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
3ac59d60a9
commit
6c1bfe3cec
1 changed files with 8 additions and 1 deletions
|
@ -3,6 +3,13 @@ require_relative '../spec_helper'
|
|||
describe Supplier do
|
||||
let(:supplier) { create :supplier }
|
||||
|
||||
it 'return correct tolerance' do
|
||||
supplier = create :supplier, articles: create_list(:article, 1, unit_quantity: 1)
|
||||
expect(supplier.has_tolerance?).to be false
|
||||
supplier2 = create :supplier, articles: create_list(:article, 1, unit_quantity: 2)
|
||||
expect(supplier2.has_tolerance?).to be true
|
||||
end
|
||||
|
||||
it 'deletes the supplier and its articles' do
|
||||
supplier = create :supplier, article_count: 3
|
||||
supplier.articles.each{ |a| expect(a).to receive(:mark_as_deleted) }
|
||||
|
|
Loading…
Reference in a new issue