Expect to be_valid instead of checking presence of specific error spec/models/spree/shipping_method_spec.rb

Co-authored-by: Maikel <maikel@email.org.au>
This commit is contained in:
Cillian O'Ruanaidh
2022-06-20 21:09:48 +01:00
committed by Filipe
parent f25de984d2
commit cc5daf51b1

View File

@@ -148,8 +148,7 @@ module Spree
shipping_method = build_stubbed(:shipping_method)
[nil, "", "back_end"].each do |display_on_option|
shipping_method.display_on = display_on_option
shipping_method.valid?
expect(shipping_method.errors[:display_on]).to be_empty
expect(shipping_method).to be_valid
end
end