Stylistic changes

This commit is contained in:
Rohan Mitchell
2014-09-02 12:06:35 +10:00
parent b941ffabeb
commit 021cca4fca
2 changed files with 7 additions and 7 deletions

View File

@@ -185,7 +185,7 @@ Spree::Product.class_eval do
if variant_unit_changed?
option_types.delete self.class.all_variant_unit_option_types
option_types << variant_unit_option_type if variant_unit.present?
variants_including_master.each { |v| v.update_units }
variants_including_master.each &:update_units
end
end

View File

@@ -27,12 +27,6 @@ module Spree
product.should_not be_valid
end
it "defaults available_on to now" do
Timecop.freeze
product = Product.new
product.available_on.should == Time.now
end
it "does not save when master is invalid" do
s = create(:supplier_enterprise)
t = create(:taxon)
@@ -41,6 +35,12 @@ module Spree
product.save.should be_false
end
it "defaults available_on to now" do
Timecop.freeze
product = Product.new
product.available_on.should == Time.now
end
context "when the product has variants" do
let(:product) do
product = create(:simple_product)