diff --git a/core/spec/models/spree/zone_spec.rb b/core/spec/models/spree/zone_spec.rb index 16dcbc4502d..e6f7d43ce88 100644 --- a/core/spec/models/spree/zone_spec.rb +++ b/core/spec/models/spree/zone_spec.rb @@ -137,6 +137,16 @@ @target = create(:zone, name: 'target', zone_members: []) end + it "should contain itself" do + expect(@source.contains?(@source)).to be true + end + + context "when both source and target have no members" do + it "should be false" do + expect(@source.contains?(@target)).to be false + end + end + context "when the target has no members" do before { @source.members.create(zoneable: country1) }