Sha256: 7b3d8fd7762fb295fe0e1866daeac6f9bccda440ffbeb52f1ad83f4799b0cd6a

Contents?: true

Size: 857 Bytes

Versions: 38

Compression:

Stored size: 857 Bytes

Contents

require 'spec_helper'

describe Metasploit::Model::Search::Operator::Null do
  subject(:operator) do
    described_class.new
  end

  it { should be_a Metasploit::Model::Search::Operator::Single }

  context 'validations' do
    context 'name' do
      let(:error) do
        I18n.translate('metasploit.model.errors.models.metasploit/model/search/operator/null.attributes.name.unknown')
      end

      before(:each) do
        operator.valid?
      end

      it 'should record error' do
        operator.errors[:name].should include(error)
      end
    end
  end

  context '#type' do
    subject(:type) do
      operator.type
    end

    it { should be_nil }
  end

  context '#operation_class' do
    subject(:operation_class) do
      operator.send(:operation_class)
    end

    it { should == Metasploit::Model::Search::Operation::Null }
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
metasploit-model-1.0.0.pre.rails.pre.4.0 spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.30.0 spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.30.0-java spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.29.2 spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.29.2-java spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.29.0 spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.29.0-java spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.28.0 spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.28.0-java spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.28.0.pre.engine.pre.requires spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.27.4 spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.27.4-java spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.27.3 spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.27.3-java spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.27.2 spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.27.2-java spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.27.1 spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.27.1-java spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.27.0 spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.27.0-java spec/app/models/metasploit/model/search/operator/null_spec.rb