Sha256: 4ee8b1d70664a4f2ef418b61bf4f481efb50c08a245e5891cf90d7bbbefffce5

Contents?: true

Size: 983 Bytes

Versions: 32

Compression:

Stored size: 983 Bytes

Contents

RSpec.describe Mdm::Module::Target, type: :model do

  it_should_behave_like 'Metasploit::Concern.run'

  context 'associations' do
    it { is_expected.to belong_to(:detail).class_name('Mdm::Module::Detail') }
  end

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

    context 'indices' do
      it { is_expected.to have_db_index(:detail_id) }
    end
  end

  context 'factories' do
    context 'mdm_module_target' do
      subject(:mdm_module_target) do
        FactoryBot.build :mdm_module_target
      end

      it { is_expected.to be_valid }
    end
  end

  context 'validations' do
    it { is_expected.to validate_presence_of(:detail) }
    it { is_expected.to validate_presence_of(:index) }
    it { is_expected.to validate_presence_of(:name) }
  end
end

Version data entries

32 entries across 32 versions & 2 rubygems

Version Path
wg-metasploit_data_models-4.1.4.02 spec/app/models/mdm/module/target_spec.rb
metasploit_data_models-6.0.5 spec/app/models/mdm/module/target_spec.rb
metasploit_data_models-6.0.4 spec/app/models/mdm/module/target_spec.rb
metasploit_data_models-6.0.3 spec/app/models/mdm/module/target_spec.rb
metasploit_data_models-6.0.2 spec/app/models/mdm/module/target_spec.rb
metasploit_data_models-6.0.1 spec/app/models/mdm/module/target_spec.rb
metasploit_data_models-6.0.0 spec/app/models/mdm/module/target_spec.rb
metasploit_data_models-5.0.6 spec/app/models/mdm/module/target_spec.rb
metasploit_data_models-5.0.5 spec/app/models/mdm/module/target_spec.rb
metasploit_data_models-5.0.4 spec/app/models/mdm/module/target_spec.rb
metasploit_data_models-5.0.3 spec/app/models/mdm/module/target_spec.rb
metasploit_data_models-5.0.2 spec/app/models/mdm/module/target_spec.rb
metasploit_data_models-5.0.1 spec/app/models/mdm/module/target_spec.rb
metasploit_data_models-5.0.0 spec/app/models/mdm/module/target_spec.rb
metasploit_data_models-4.1.4 spec/app/models/mdm/module/target_spec.rb
metasploit_data_models-4.1.3 spec/app/models/mdm/module/target_spec.rb
metasploit_data_models-4.1.2 spec/app/models/mdm/module/target_spec.rb
metasploit_data_models-4.1.1 spec/app/models/mdm/module/target_spec.rb
metasploit_data_models-4.1.0 spec/app/models/mdm/module/target_spec.rb
metasploit_data_models-4.0.2 spec/app/models/mdm/module/target_spec.rb