Sha256: 78233d7db18d402a3e753fcfdb99a0e639894f0af7a69cbdafd93e67b4395059

Contents?: true

Size: 499 Bytes

Versions: 48

Compression:

Stored size: 499 Bytes

Contents

# frozen_string_literal: true

require 'rails_helper'

RSpec.describe Spree::VariantPropertyRuleCondition, type: :model do
  context "touching" do
    let(:rule_condition) { create(:variant_property_rule_condition) }

    before do
      rule_condition.variant_property_rule.update_columns(updated_at: 1.day.ago)
    end

    it "should update the variant property rule" do
      expect { rule_condition.touch }.to change { rule_condition.reload.variant_property_rule.updated_at }
    end
  end
end

Version data entries

48 entries across 48 versions & 2 rubygems

Version Path
solidus_core-2.10.5 spec/models/spree/variant_property_rule_condition_spec.rb
solidus_core-2.10.3 spec/models/spree/variant_property_rule_condition_spec.rb
solidus_core-2.10.2 spec/models/spree/variant_property_rule_condition_spec.rb
solidus_core-2.9.6 spec/models/spree/variant_property_rule_condition_spec.rb
solidus_core-2.8.6 spec/models/spree/variant_property_rule_condition_spec.rb
solidus_core-2.10.1 spec/models/spree/variant_property_rule_condition_spec.rb
solidus_core-2.9.5 spec/models/spree/variant_property_rule_condition_spec.rb
solidus_core-2.10.0 spec/models/spree/variant_property_rule_condition_spec.rb
solidus_core-2.9.4 spec/models/spree/variant_property_rule_condition_spec.rb
solidus_core-2.6.6 spec/models/spree/variant_property_rule_condition_spec.rb
solidus_core-2.7.4 spec/models/spree/variant_property_rule_condition_spec.rb
solidus_core-2.8.5 spec/models/spree/variant_property_rule_condition_spec.rb
solidus_core-2.9.3 spec/models/spree/variant_property_rule_condition_spec.rb
solidus_core-2.9.2 spec/models/spree/variant_property_rule_condition_spec.rb
solidus_core-2.10.0.beta1 spec/models/spree/variant_property_rule_condition_spec.rb
solidus_core-2.7.3 spec/models/spree/variant_property_rule_condition_spec.rb
solidus_core-2.6.5 spec/models/spree/variant_property_rule_condition_spec.rb
solidus_core-2.9.1 spec/models/spree/variant_property_rule_condition_spec.rb
solidus_core-2.9.0 spec/models/spree/variant_property_rule_condition_spec.rb
solidus_core-2.9.0.rc.1 spec/models/spree/variant_property_rule_condition_spec.rb