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-0.27.0.pre.dep.pre.railties spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.26.1-java spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.26.1 spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.25.7 spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.25.7-java spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.25.6 spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.25.6-java spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.25.3 spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.25.3-java spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.25.2 spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.25.2-java spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.25.1 spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.25.1-java spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.25.1.pre.metasploit.pre.model.pre.search.pre.operator.pre.and.pre.operation.pre.groups-java spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.25.1.pre.metasploit.pre.model.pre.search.pre.operator.pre.and.pre.operation.pre.groups spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.24.1-java spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.24.1 spec/app/models/metasploit/model/search/operator/null_spec.rb
metasploit-model-0.24.1.pre.semantic.pre.versioning.pre.2.pre.0 spec/app/models/metasploit/model/search/operator/null_spec.rb