Sha256: c51be7bd68ce3d7bab4901a48a5426781e50c34e9d93050fb16b122bdd6040b1
Contents?: true
Size: 581 Bytes
Versions: 16
Compression:
Stored size: 581 Bytes
Contents
require 'spec_helper' describe Spree::OptionValue, type: :model do describe 'delegate' do it { is_expected.to delegate_method(:name).to(:option_type).with_prefix } it { is_expected.to delegate_method(:presentation).to(:option_type).with_prefix } end 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.current) end end end
Version data entries
16 entries across 16 versions & 1 rubygems