Sha256: b735dfcdce5040c73f9a6cc4589e9497de9f1352001ed9ba34aa66240ede9fc4

Contents?: true

Size: 990 Bytes

Versions: 15

Compression:

Stored size: 990 Bytes

Contents

RSpec.describe Metasploit::Credential::Origin::Import, type: :model do
  it_should_behave_like 'Metasploit::Concern.run'

  context 'associations' do
    it { is_expected.to have_many(:cores).class_name('Metasploit::Credential::Core').dependent(:destroy) }
    it { is_expected.to belong_to(:task).class_name('Mdm::Task') }
  end

  context 'database' do
    context 'columns' do
      it { is_expected.to have_db_column(:filename).of_type(:text).with_options(null: false) }

      it_should_behave_like 'timestamp database columns'

      context 'foreign keys' do
        it { is_expected.to have_db_column(:task_id).of_type(:integer) }
      end
    end

    context 'indices' do
      context 'foreign keys' do
        it { is_expected.to have_db_index(:task_id) }
      end
    end
  end

  context 'factories' do


    subject(:metasploit_credential_origin_import) do
      FactoryGirl.build(:metasploit_credential_origin_import)
    end

    it { is_expected.to be_valid }
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
metasploit-credential-2.0.14 spec/models/metasploit/credential/origin/import_spec.rb
metasploit-credential-2.0.13 spec/models/metasploit/credential/origin/import_spec.rb
metasploit-credential-2.0.12 spec/models/metasploit/credential/origin/import_spec.rb
metasploit-credential-2.0.11 spec/models/metasploit/credential/origin/import_spec.rb
metasploit-credential-2.0.10 spec/models/metasploit/credential/origin/import_spec.rb
metasploit-credential-2.0.9 spec/models/metasploit/credential/origin/import_spec.rb
metasploit-credential-2.0.8 spec/models/metasploit/credential/origin/import_spec.rb
metasploit-credential-2.0.7 spec/models/metasploit/credential/origin/import_spec.rb
metasploit-credential-2.0.6 spec/models/metasploit/credential/origin/import_spec.rb
metasploit-credential-2.0.5 spec/models/metasploit/credential/origin/import_spec.rb
metasploit-credential-2.0.4 spec/models/metasploit/credential/origin/import_spec.rb
metasploit-credential-2.0.3 spec/models/metasploit/credential/origin/import_spec.rb
metasploit-credential-2.0.2 spec/models/metasploit/credential/origin/import_spec.rb
metasploit-credential-2.0.1 spec/models/metasploit/credential/origin/import_spec.rb
metasploit-credential-2.0.0 spec/models/metasploit/credential/origin/import_spec.rb