Sha256: 8622939b71c951dbfa059cce40970142f294007777f146bf611bbbd385b4134f

Contents?: true

Size: 418 Bytes

Versions: 11

Compression:

Stored size: 418 Bytes

Contents

require 'rails_helper'

RSpec.describe Spree::PromotionCategory, type: :model do
  describe 'validation' do
    let(:name) { 'Nom' }
    subject { Spree::PromotionCategory.new name: name }

    context 'when all required attributes are specified' do
      it { is_expected.to be_valid }
    end

    context 'when name is missing' do
      let(:name) { nil }
      it { is_expected.not_to be_valid }
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
solidus_core-2.5.2 spec/models/spree/promotion_category_spec.rb
solidus_core-2.5.1 spec/models/spree/promotion_category_spec.rb
solidus_core-2.5.0 spec/models/spree/promotion_category_spec.rb
solidus_core-2.5.0.rc1 spec/models/spree/promotion_category_spec.rb
solidus_core-2.5.0.beta2 spec/models/spree/promotion_category_spec.rb
solidus_core-2.5.0.beta1 spec/models/spree/promotion_category_spec.rb
solidus_core-2.4.2 spec/models/spree/promotion_category_spec.rb
solidus_core-2.4.1 spec/models/spree/promotion_category_spec.rb
solidus_core-2.4.0 spec/models/spree/promotion_category_spec.rb
solidus_core-2.4.0.rc1 spec/models/spree/promotion_category_spec.rb
solidus_core-2.4.0.beta1 spec/models/spree/promotion_category_spec.rb