Sha256: af3c962d475264fe346e03f852f6a533ffdbf4a8e54b786a3647617dda2965cf

Contents?: true

Size: 1.7 KB

Versions: 16

Compression:

Stored size: 1.7 KB

Contents

require 'spec_helper'

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 { should == 'Active Directory Domain' }
      it { should be_in described_class::ALL }
    end

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

      it { should include described_class::ACTIVE_DIRECTORY_DOMAIN }
      it { should include described_class::ORACLE_SYSTEM_IDENTIFIER }
      it { should include described_class::POSTGRESQL_DATABASE }
      it { should include described_class::WILDCARD }
    end

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

      it { should == 'Oracle System Identifier' }
      it { should be_in described_class::ALL }
    end

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

      it { should == 'PostgreSQL Database' }
      it { should be_in described_class::ALL }
    end

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

      it { should == '*' }
      it { should 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|
          key.should be_a(String)
        }
      end
      context 'values' do
        subject { described_class::SHORT_NAMES.values.sort }
        it { should match_array(described_class::ALL.sort) }
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
metasploit-model-1.0.0.pre.rails.pre.4.0 spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-0.30.0 spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-0.30.0-java spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-0.29.2 spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-0.29.2-java spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-0.29.0 spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-0.29.0-java spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-0.28.0 spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-0.28.0-java spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-0.28.0.pre.engine.pre.requires spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-0.27.4 spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-0.27.4-java spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-0.27.3 spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-0.27.3-java spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-0.27.2 spec/lib/metasploit/model/realm/key_spec.rb
metasploit-model-0.27.2-java spec/lib/metasploit/model/realm/key_spec.rb