Sha256: 23b03dbad5e1c0daf3808e90a4f95ea7b9db74f52ee1b5082b3eb8d79314d523

Contents?: true

Size: 457 Bytes

Versions: 17

Compression:

Stored size: 457 Bytes

Contents

require 'spec_helper'

describe Spree::OptionType, :type => :model do
  context "touching" do
    it "should touch a product" do
      product_option_type = create(:product_option_type)
      option_type = product_option_type.option_type
      product = product_option_type.product
      product.update_column(:updated_at, 1.day.ago)
      option_type.touch
      expect(product.reload.updated_at).to be_within(3.seconds).of(Time.current)
    end
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
solidus_core-1.2.3 spec/models/spree/option_type_spec.rb
spree_core-3.1.5 spec/models/spree/option_type_spec.rb
spree_core-3.1.4 spec/models/spree/option_type_spec.rb
spree_core-3.1.3 spec/models/spree/option_type_spec.rb
spree_core-3.1.2 spec/models/spree/option_type_spec.rb
spree_core-3.1.1 spec/models/spree/option_type_spec.rb
spree_core-3.1.0 spec/models/spree/option_type_spec.rb
spree_core-3.1.0.rc4 spec/models/spree/option_type_spec.rb
spree_core-3.1.0.rc3 spec/models/spree/option_type_spec.rb
spree_core-3.1.0.rc2 spec/models/spree/option_type_spec.rb
spree_core-3.1.0.rc1 spec/models/spree/option_type_spec.rb
solidus_core-1.2.2 spec/models/spree/option_type_spec.rb
solidus_core-1.2.1 spec/models/spree/option_type_spec.rb
solidus_core-1.2.0 spec/models/spree/option_type_spec.rb
solidus_core-1.2.0.rc2 spec/models/spree/option_type_spec.rb
solidus_core-1.2.0.rc1 spec/models/spree/option_type_spec.rb
solidus_core-1.2.0.beta1 spec/models/spree/option_type_spec.rb