mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Add price field test
This commit is contained in:
@@ -16,5 +16,13 @@ module Spree
|
||||
expect(price.reload.variant).to eq variant
|
||||
end
|
||||
end
|
||||
|
||||
context "with large values" do
|
||||
let(:expensive_variant) { build(:variant, price: 10_000_000) }
|
||||
|
||||
it "throws an error" do
|
||||
expect{ expensive_variant.save }.to raise_error ActiveRecord::StatementInvalid
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user