Sha256: b801c07b4aa1e6bbfde618d17b50629d11019198176f1591bf2776b9ae6b954f

Contents?: true

Size: 383 Bytes

Versions: 6

Compression:

Stored size: 383 Bytes

Contents

require 'spec_helper'

describe Spree::OptionValue, :type => :model do
  context "touching" do
    it "should touch a variant" do
      variant = create(:variant)
      option_value = variant.option_values.first
      variant.update_column(:updated_at, 1.day.ago)
      option_value.touch
      expect(variant.reload.updated_at).to be_within(3.seconds).of(Time.now)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
spree_core-3.0.10 spec/models/spree/option_value_spec.rb
spree_core-3.0.9 spec/models/spree/option_value_spec.rb
spree_core-3.0.8 spec/models/spree/option_value_spec.rb
spree_core-3.0.7 spec/models/spree/option_value_spec.rb
spree_core-3.0.6.1 spec/models/spree/option_value_spec.rb
spree_core-3.0.6 spec/models/spree/option_value_spec.rb