Reload tested variant and price objects

This commit is contained in:
Matt-Yorkley
2019-09-11 04:32:19 +01:00
parent 64a501ee20
commit a15db65e69
2 changed files with 3 additions and 3 deletions

View File

@@ -28,7 +28,7 @@ module Spree
end
it "can access the variant" do
expect(price.variant).to eq variant
expect(price.reload.variant).to eq variant
end
end
end

View File

@@ -138,11 +138,11 @@ describe VariantOverride do
end
it "soft-deletes the price" do
expect(price_object.deleted_at).to_not be_nil
expect(price_object.reload.deleted_at).to_not be_nil
end
it "can access the soft-deleted price" do
expect(variant_with_price.default_price).to eq price_object
expect(variant_with_price.reload.default_price).to eq price_object
expect(variant_with_price.price).to eq 123.45
end
end