From 8e14e0e95018cb07b78bc007bce3016a604649dd Mon Sep 17 00:00:00 2001 From: Andy Brett Date: Wed, 14 Apr 2021 10:10:11 -0700 Subject: [PATCH] add variant spec --- spec/models/spree/variant_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/models/spree/variant_spec.rb b/spec/models/spree/variant_spec.rb index 239962a655..3589df55aa 100644 --- a/spec/models/spree/variant_spec.rb +++ b/spec/models/spree/variant_spec.rb @@ -18,6 +18,11 @@ module Spree variant.price = 0 expect(variant).to be_valid end + + it "should validate unit_value is greater than 0" do + variant.unit_value = 0 + expect(variant).to be_invalid + end end context "price parsing" do