Sha256: 0f1dfae628d465ed163b2b080ed271bf4028c1a425961d57b48e46d7dcb9c4b8

Contents?: true

Size: 398 Bytes

Versions: 3

Compression:

Stored size: 398 Bytes

Contents

require 'spec_helper'

RSpec.describe Spree::Label, type: :model do

  let(:label) { create(:label) }

  it {is_expected.to validate_presence_of(:name)}
  it {is_expected.to validate_uniqueness_of(:name)}
  it {is_expected.to validate_presence_of(:color)}
  it {is_expected.to have_and_belong_to_many(:variants)}

  it 'must have a valid factory' do
    expect(build(:label)).to be_valid
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
spree_zaez_variants_labels-3.0.5 spec/models/spree/label_spec.rb
spree_zaez_variants_labels-3.0.4 spec/models/spree/label_spec.rb
spree_zaez_variants_labels-3.0.1 spec/models/spree/label_spec.rb