Sha256: e44441e9e23f710604cf7ac23a648625ebd1f641a8e4a324eec07c5ad311831f

Contents?: true

Size: 692 Bytes

Versions: 23

Compression:

Stored size: 692 Bytes

Contents

require 'spec_helper'

module Naf
  describe LoggerLevel do
    # Mass-assignment
    [:level].each do |a|
      it { should allow_mass_assignment_of(a) }
    end

    [:id,
     :created_at,
     :updated_at].each do |a|
      it { should_not allow_mass_assignment_of(a) }
    end

    #---------------------
    # *** Associations ***
    #+++++++++++++++++++++

    it { should have_many(:logger_style_names) }

    #--------------------
    # *** Validations ***
    #++++++++++++++++++++

    it { should validate_presence_of(:level) }

    describe "uniqueness"do
      subject { FactoryGirl.create(:logger_level) }
      it { should validate_uniqueness_of(:level) }
    end

  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
naf-2.1.13 spec/models/naf/logger_level_spec.rb
naf-2.1.12 spec/models/naf/logger_level_spec.rb
naf-2.1.11 spec/models/naf/logger_level_spec.rb
naf-2.1.10 spec/models/naf/logger_level_spec.rb
naf-2.1.9 spec/models/naf/logger_level_spec.rb
naf-2.1.8 spec/models/naf/logger_level_spec.rb
naf-2.1.6 spec/models/naf/logger_level_spec.rb
naf-2.1.5 spec/models/naf/logger_level_spec.rb
naf-2.1.4 spec/models/naf/logger_level_spec.rb
naf-2.1.3 spec/models/naf/logger_level_spec.rb
naf-2.1.2 spec/models/naf/logger_level_spec.rb
naf-2.1.1 spec/models/naf/logger_level_spec.rb
naf-2.1.0 spec/models/naf/logger_level_spec.rb
naf-2.0.4 spec/models/naf/logger_level_spec.rb
naf-2.0.3 spec/models/naf/logger_level_spec.rb
naf-2.0.2 spec/models/naf/logger_level_spec.rb
naf-2.0.1 spec/models/naf/logger_level_spec.rb
naf-2.0.0 spec/models/naf/logger_level_spec.rb
naf-1.1.4 spec/models/naf/logger_level_spec.rb
naf-1.1.3 spec/models/naf/logger_level_spec.rb