Sha256: 6a616c7e0e21d03e940fe5f9218b71ca8f572a5c40fccc6cc514da9bbd53af8e

Contents?: true

Size: 911 Bytes

Versions: 32

Compression:

Stored size: 911 Bytes

Contents

RSpec.describe Mdm::Route, type: :model do
  it_should_behave_like 'Metasploit::Concern.run'

  context 'associations' do
    it { is_expected.to belong_to(:session).class_name('Mdm::Session') }
  end

  context 'factory' do
    it 'should be valid' do
      route = FactoryBot.build(:mdm_route)
      expect(route).to be_valid
    end
  end

  context '#destroy' do
    it 'should successfully destroy the object' do
      route = FactoryBot.create(:mdm_route)
      expect {
        route.destroy
      }.to_not raise_error
      expect {
        route.reload
      }.to raise_error(ActiveRecord::RecordNotFound)
    end
  end

  context 'database' do
    context 'columns' do
      it { is_expected.to have_db_column(:session_id).of_type(:integer) }
      it { is_expected.to have_db_column(:subnet).of_type(:string) }
      it { is_expected.to have_db_column(:netmask).of_type(:string) }
    end
  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/route_spec.rb
metasploit_data_models-6.0.5 spec/app/models/mdm/route_spec.rb
metasploit_data_models-6.0.4 spec/app/models/mdm/route_spec.rb
metasploit_data_models-6.0.3 spec/app/models/mdm/route_spec.rb
metasploit_data_models-6.0.2 spec/app/models/mdm/route_spec.rb
metasploit_data_models-6.0.1 spec/app/models/mdm/route_spec.rb
metasploit_data_models-6.0.0 spec/app/models/mdm/route_spec.rb
metasploit_data_models-5.0.6 spec/app/models/mdm/route_spec.rb
metasploit_data_models-5.0.5 spec/app/models/mdm/route_spec.rb
metasploit_data_models-5.0.4 spec/app/models/mdm/route_spec.rb
metasploit_data_models-5.0.3 spec/app/models/mdm/route_spec.rb
metasploit_data_models-5.0.2 spec/app/models/mdm/route_spec.rb
metasploit_data_models-5.0.1 spec/app/models/mdm/route_spec.rb
metasploit_data_models-5.0.0 spec/app/models/mdm/route_spec.rb
metasploit_data_models-4.1.4 spec/app/models/mdm/route_spec.rb
metasploit_data_models-4.1.3 spec/app/models/mdm/route_spec.rb
metasploit_data_models-4.1.2 spec/app/models/mdm/route_spec.rb
metasploit_data_models-4.1.1 spec/app/models/mdm/route_spec.rb
metasploit_data_models-4.1.0 spec/app/models/mdm/route_spec.rb
metasploit_data_models-4.0.2 spec/app/models/mdm/route_spec.rb