Sha256: 3b4d6a6d9361bc7dfb59bbfb65d7ae24fc5bb7c9bd0ace948309847eef845879

Contents?: true

Size: 903 Bytes

Versions: 43

Compression:

Stored size: 903 Bytes

Contents

require 'spec_helper'

describe Mdm::Module::Arch do
  context 'associations' do
    it { should belong_to(:detail).class_name('Mdm::Module::Detail') }
  end

  context 'database' do
    context 'columns' do
      it { should have_db_column(:detail_id).of_type(:integer) }
      it { should have_db_column(:name).of_type(:text) }
    end

    context 'indices' do
      it { should have_db_index(:detail_id) }
    end
  end

  context 'factories' do
    context 'mdm_module_arch' do
      subject(:mdm_module_arch) do
        FactoryGirl.build(:mdm_module_arch)
      end

      it { should be_valid }
    end
  end

  context 'mass assignment security' do
    it { should_not allow_mass_assignment_of(:detail_id) }
    it { should allow_mass_assignment_of(:name) }
  end

  context 'validations' do
    it { should validate_presence_of(:detail) }
    it { should validate_presence_of(:name) }
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
metasploit_data_models-0.16.1-java spec/app/models/mdm/module/arch_spec.rb
metasploit_data_models-0.16.1 spec/app/models/mdm/module/arch_spec.rb
metasploit_data_models-0.16.0-java spec/app/models/mdm/module/arch_spec.rb
metasploit_data_models-0.16.0 spec/app/models/mdm/module/arch_spec.rb
metasploit_data_models-0.15.2-java spec/app/models/mdm/module/arch_spec.rb
metasploit_data_models-0.15.2 spec/app/models/mdm/module/arch_spec.rb
metasploit_data_models-0.15.1-java spec/app/models/mdm/module/arch_spec.rb
metasploit_data_models-0.15.1 spec/app/models/mdm/module/arch_spec.rb
metasploit_data_models-0.15.0 spec/app/models/mdm/module/arch_spec.rb
metasploit_data_models-0.14.4-java spec/app/models/mdm/module/arch_spec.rb
metasploit_data_models-0.14.4 spec/app/models/mdm/module/arch_spec.rb
metasploit_data_models-0.14.3-java spec/app/models/mdm/module/arch_spec.rb
metasploit_data_models-0.14.3 spec/app/models/mdm/module/arch_spec.rb
metasploit_data_models-0.14.2-java spec/app/models/mdm/module/arch_spec.rb
metasploit_data_models-0.14.2 spec/app/models/mdm/module/arch_spec.rb
metasploit_data_models-0.14.1-java spec/app/models/mdm/module/arch_spec.rb
metasploit_data_models-0.14.1 spec/app/models/mdm/module/arch_spec.rb
metasploit_data_models-0.12.1-java spec/app/models/mdm/module/arch_spec.rb
metasploit_data_models-0.12.1 spec/app/models/mdm/module/arch_spec.rb
metasploit_data_models-0.12.0-java spec/app/models/mdm/module/arch_spec.rb