Sha256: 1461e5ec3c5076f2ee10c71fd2145b4900ed53e582930e2c1a0d61373fe7c7d8

Contents?: true

Size: 784 Bytes

Versions: 64

Compression:

Stored size: 784 Bytes

Contents

RSpec.describe MetasploitDataModels::Search::Operation::Port::Number, type: :model do
  context 'CONSTANTS' do
    context 'BITS' do
      subject(:bits) {
        described_class::BITS
      }

      it { is_expected.to eq(16) }
    end

    context 'MAXIMUM' do
      subject(:maxium) {
        described_class::MAXIMUM
      }

      it { is_expected.to eq(65535) }
    end

    context 'MINIMUM' do
      subject(:minimum) {
        described_class::MINIMUM
      }

      it { is_expected.to eq(0) }
    end

    context 'RANGE' do
      subject(:range) {
        described_class::RANGE
      }

      it { is_expected.to eq((0..65535)) }
    end
  end

  context 'validations' do
    it { is_expected.to validate_inclusion_of(:value).in_range(described_class::RANGE) }
  end
end

Version data entries

64 entries across 64 versions & 2 rubygems

Version Path
wg-metasploit_data_models-4.1.4.02 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-6.0.5 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-6.0.4 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-6.0.3 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-6.0.2 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-6.0.1 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-6.0.0 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-5.0.6 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-5.0.5 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-5.0.4 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-5.0.3 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-5.0.2 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-5.0.1 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-5.0.0 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-4.1.4 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-4.1.3 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-4.1.2 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-4.1.1 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-4.1.0 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-4.0.2 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb