Sha256: 67824dc7e7aa698da4f1d4d383fee59f8ea95e10a6a7e3f379cc3c33747ef4d1

Contents?: true

Size: 1.79 KB

Versions: 30

Compression:

Stored size: 1.79 KB

Contents

RSpec.describe Metasploit::Model::Realm::Key do
  context 'CONSTANTS' do
    context 'ACTIVE_DIRECTORY_DOMAIN' do
      subject(:active_directory_domain) do
        described_class::ACTIVE_DIRECTORY_DOMAIN
      end

      it { is_expected.to eq('Active Directory Domain') }
      it { is_expected.to be_in described_class::ALL }
    end

    context 'ALL' do
      subject(:all) do
        described_class::ALL
      end

      it { is_expected.to include described_class::ACTIVE_DIRECTORY_DOMAIN }
      it { is_expected.to include described_class::ORACLE_SYSTEM_IDENTIFIER }
      it { is_expected.to include described_class::POSTGRESQL_DATABASE }
      it { is_expected.to include described_class::WILDCARD }
    end

    context 'ORACLE_SYSTEM_IDENTIFIER' do
      subject(:oracle_system_identifier) do
        described_class::ORACLE_SYSTEM_IDENTIFIER
      end

      it { is_expected.to eq('Oracle System Identifier') }
      it { is_expected.to be_in described_class::ALL }
    end

    context 'POSTGRESQL DATABASE' do
      subject(:postgresql_database) do
        described_class::POSTGRESQL_DATABASE
      end

      it { is_expected.to eq('PostgreSQL Database') }
      it { is_expected.to be_in described_class::ALL }
    end

    context 'WILDCARD' do
      subject(:wildcard) do
        described_class::WILDCARD
      end

      it { is_expected.to eq('*') }
      it { is_expected.to be_in described_class::ALL }
    end

    context 'SHORT_NAMES' do
      subject { described_class::SHORT_NAMES }
      it 'should have String keys' do
        subject.keys.each { |key|
          expect(key).to be_a(String)
        }
      end
      context 'values' do
        subject { described_class::SHORT_NAMES.values.sort }
        it { is_expected.to match_array(described_class::ALL.sort) }
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
metasploit-model-5.0.2 spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-5.0.1 spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-5.0.0 spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-4.0.6 spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-4.0.5 spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-4.0.4 spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-4.0.3 spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-4.0.2 spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-4.0.1 spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-4.0.0 spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-3.1.4 spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-3.1.3 spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-3.1.2 spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-3.1.1 spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-3.1.0 spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-3.0.0 spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-2.0.4 spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-2.0.3 spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-2.0.2 spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-2.0.1 spec/lib/metasploit/model/realm/key_spec.rb