Sha256: ea0dc3d1410ad16e94315909e05c63c27c76fc7538207cd1af5ccfd99f3cd3e4

Contents?: true

Size: 829 Bytes

Versions: 24

Compression:

Stored size: 829 Bytes

Contents

require 'spec_helper'

describe Mdm::Route do

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

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

  context '#destroy' do
    it 'should successfully destroy the object' do
      route = FactoryGirl.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 { should have_db_column(:session_id).of_type(:integer) }
      it { should have_db_column(:subnet).of_type(:string) }
      it { should have_db_column(:netmask).of_type(:string) }
    end
  end

end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
metasploit_data_models-0.17.2-java spec/app/models/mdm/route_spec.rb
metasploit_data_models-0.17.2 spec/app/models/mdm/route_spec.rb
metasploit_data_models-0.17.2.pre.metasploit.pre.data.pre.models.pre.search spec/app/models/mdm/route_spec.rb
metasploit_data_models-0.17.1-java spec/app/models/mdm/route_spec.rb
metasploit_data_models-0.17.1 spec/app/models/mdm/route_spec.rb
metasploit_data_models-0.17.0-java spec/app/models/mdm/route_spec.rb
metasploit_data_models-0.17.0 spec/app/models/mdm/route_spec.rb
metasploit_data_models-0.16.9 spec/app/models/mdm/route_spec.rb
metasploit_data_models-0.16.9-java spec/app/models/mdm/route_spec.rb
metasploit_data_models-0.16.8 spec/app/models/mdm/route_spec.rb
metasploit_data_models-0.16.8-java spec/app/models/mdm/route_spec.rb
metasploit_data_models-0.16.7-java spec/app/models/mdm/route_spec.rb
metasploit_data_models-0.16.7 spec/app/models/mdm/route_spec.rb
metasploit_data_models-0.16.6-java spec/app/models/mdm/route_spec.rb
metasploit_data_models-0.16.6 spec/app/models/mdm/route_spec.rb
metasploit_data_models-0.16.5-java spec/app/models/mdm/route_spec.rb
metasploit_data_models-0.16.5 spec/app/models/mdm/route_spec.rb
metasploit_data_models-0.16.4-java spec/app/models/mdm/route_spec.rb
metasploit_data_models-0.16.4 spec/app/models/mdm/route_spec.rb
metasploit_data_models-0.16.3-java spec/app/models/mdm/route_spec.rb