Sha256: c84790ff26070fd2cc8fc458a20bdd5edec25138b1b8963ca1f710a35be92eb3

Contents?: true

Size: 951 Bytes

Versions: 31

Compression:

Stored size: 951 Bytes

Contents

shared_examples_for 'search query with Metasploit::Model::Search::Operator::Deprecated::App' do
  context 'with app' do
    subject(:query) do
      Metasploit::Model::Search::Query.new(
          :formatted => formatted,
          :klass => base_class
      )
    end

    let(:formatted) do
      "app:#{formatted_value}"
    end

    context 'operations' do
      subject(:operations) do
        query.operations
      end

      context 'stance' do
        subject(:operation) do
          operations.find { |operation|
            operation.operator.name == :stance
          }
        end

        context 'with client' do
          let(:formatted_value) do
            'client'
          end

          its(:value) { should == 'passive' }
        end

        context 'with server' do
          let(:formatted_value) do
            'server'
          end

          its(:value) { should == 'aggressive' }
        end
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
metasploit-model-0.28.0 spec/support/shared/examples/search/query/metasploit/model/search/operator/deprecated/app.rb
metasploit-model-0.28.0-java spec/support/shared/examples/search/query/metasploit/model/search/operator/deprecated/app.rb
metasploit-model-0.28.0.pre.engine.pre.requires spec/support/shared/examples/search/query/metasploit/model/search/operator/deprecated/app.rb
metasploit-model-0.27.4 spec/support/shared/examples/search/query/metasploit/model/search/operator/deprecated/app.rb
metasploit-model-0.27.4-java spec/support/shared/examples/search/query/metasploit/model/search/operator/deprecated/app.rb
metasploit-model-0.27.3 spec/support/shared/examples/search/query/metasploit/model/search/operator/deprecated/app.rb
metasploit-model-0.27.3-java spec/support/shared/examples/search/query/metasploit/model/search/operator/deprecated/app.rb
metasploit-model-0.27.2 spec/support/shared/examples/search/query/metasploit/model/search/operator/deprecated/app.rb
metasploit-model-0.27.2-java spec/support/shared/examples/search/query/metasploit/model/search/operator/deprecated/app.rb
metasploit-model-0.27.1 spec/support/shared/examples/search/query/metasploit/model/search/operator/deprecated/app.rb
metasploit-model-0.27.1-java spec/support/shared/examples/search/query/metasploit/model/search/operator/deprecated/app.rb
metasploit-model-0.27.0 spec/support/shared/examples/search/query/metasploit/model/search/operator/deprecated/app.rb
metasploit-model-0.27.0-java spec/support/shared/examples/search/query/metasploit/model/search/operator/deprecated/app.rb
metasploit-model-0.27.0.pre.dep.pre.railties spec/support/shared/examples/search/query/metasploit/model/search/operator/deprecated/app.rb
metasploit-model-0.26.1-java spec/support/shared/examples/search/query/metasploit/model/search/operator/deprecated/app.rb
metasploit-model-0.26.1 spec/support/shared/examples/search/query/metasploit/model/search/operator/deprecated/app.rb
metasploit-model-0.25.7 spec/support/shared/examples/search/query/metasploit/model/search/operator/deprecated/app.rb
metasploit-model-0.25.7-java spec/support/shared/examples/search/query/metasploit/model/search/operator/deprecated/app.rb
metasploit-model-0.25.6 spec/support/shared/examples/search/query/metasploit/model/search/operator/deprecated/app.rb
metasploit-model-0.25.6-java spec/support/shared/examples/search/query/metasploit/model/search/operator/deprecated/app.rb