Sha256: 02b8e43c5880c05df682b9c1bc4e82e680d5ce8738efbe06a85b119bd3b083ad

Contents?: true

Size: 1.33 KB

Versions: 50

Compression:

Stored size: 1.33 KB

Contents

- name: simple expression - matching
  document:
    name: foo
  query:
    $and:
      - name: foo
  matches: true

- name: simple expression - not matching
  document:
    name: foo
  query:
    $and:
      - name: bar
  matches: false

- name: multiple expressions - matching
  document:
    name: foo
    order: 1
  query:
    $and:
      - name: foo
      - order: 1
  matches: true

- name: multiple expressions - not matching
  document:
    name: foo
    order: 1
  query:
    $and:
      - name: bar
      - order: 2
  matches: false

- name: no expressions (empty array)
  document:
    name: foo
    order: 1
  query:
    $and: []
  error: true

- name: complex expression - matching
  document:
    name: foo
  query:
    $and:
      - name:
          $in: [foo]
  matches: true

- name: complex expression - not matching
  document:
    name: foo
  query:
    $and:
      - name:
          $gt: 1
  matches: false

- name: nil argument
  document:
    positions: [ceo, cto]
  query:
    $and: ~
  error: true

- name: numeric argument
  document:
    positions: [ceo, cto]
  query:
    $and: 42
  error: true

- name: hash argument
  document:
    positions: [ceo, cto]
  query:
    $and:
      foo: bar
  error: true

- name: field value is null
  document:
    products: ~
  query:
    $and:
      -
        products:
          $ne: a
  matches: true

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
mongoid-8.0.10 spec/integration/matcher_operator_data/and.yml
mongoid-9.0.6 spec/integration/matcher_operator_data/and.yml
mongoid-8.1.10 spec/integration/matcher_operator_data/and.yml
mongoid-9.0.5 spec/integration/matcher_operator_data/and.yml
mongoid-8.1.9 spec/integration/matcher_operator_data/and.yml
mongoid-8.0.9 spec/integration/matcher_operator_data/and.yml
mongoid-9.0.4 spec/integration/matcher_operator_data/and.yml
mongoid-8.1.8 spec/integration/matcher_operator_data/and.yml
mongoid-8.1.7 spec/integration/matcher_operator_data/and.yml
mongoid-9.0.3 spec/integration/matcher_operator_data/and.yml
mongoid-8.1.6 spec/integration/matcher_operator_data/and.yml
mongoid-9.0.2 spec/integration/matcher_operator_data/and.yml
mongoid-9.0.1 spec/integration/matcher_operator_data/and.yml
mongoid-9.0.0 spec/integration/matcher_operator_data/and.yml
mongoid-8.0.8 spec/integration/matcher_operator_data/and.yml
mongoid-8.1.5 spec/integration/matcher_operator_data/and.yml
mongoid-8.1.4 spec/integration/matcher_operator_data/and.yml
mongoid-8.0.7 spec/integration/matcher_operator_data/and.yml
mongoid-8.1.3 spec/integration/matcher_operator_data/and.yml
mongoid-8.1.2 spec/integration/matcher_operator_data/and.yml