From cc5daf51b1a65a7f8eac67c641af4cd88a4f1cf0 Mon Sep 17 00:00:00 2001 From: Cillian O'Ruanaidh Date: Mon, 20 Jun 2022 21:09:48 +0100 Subject: [PATCH] Expect to be_valid instead of checking presence of specific error spec/models/spree/shipping_method_spec.rb Co-authored-by: Maikel --- spec/models/spree/shipping_method_spec.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spec/models/spree/shipping_method_spec.rb b/spec/models/spree/shipping_method_spec.rb index ba4b5d84fb..e806dc568f 100644 --- a/spec/models/spree/shipping_method_spec.rb +++ b/spec/models/spree/shipping_method_spec.rb @@ -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