Sha256: 63129b859d78a54a80519a3d9a42ad562007248124047f067b2a65450281b565

Contents?: true

Size: 1.59 KB

Versions: 39

Compression:

Stored size: 1.59 KB

Contents

- name: simple inclusion - integer
  projection:
    foo: 1
  
  queries: &field-inclusion-expectations
    - query: foo
      allowed: true
    - query: bar
      allowed: false

- name: simple inclusion - boolean
  projection:
    foo: true
  
  queries: &field-inclusion-expectations
    - query: foo
      allowed: true
    - query: bar
      allowed: false

- name: positive integer - inclusion
  projection:
    foo: 2
  
  queries: *field-inclusion-expectations

- name: simple exclusion - integer
  projection:
    foo: 0
  
  queries: &field-exclusion-expectations
    - query: foo
      allowed: false
    - query: bar
      allowed: true

- name: simple exclusion - boolean
  projection:
    foo: false
  
  queries: &field-exclusion-expectations
    - query: foo
      allowed: false
    - query: bar
      allowed: true

- name: negative integer - exclusion
  projection:
    foo: -2
  
  queries: *field-exclusion-expectations

- name: field inclusion with _id exclusion
  projection:
    foo: 1
    _id: 0
  
  queries: &field-inclusion-with-id-exclusion-expectations
    - query: foo
      allowed: true
      
    - query: bar
      allowed: false
      
    - query: _id
      allowed: false

- name: _id exclusion with field inclusion
  projection:
    _id: 0
    foo: 1
  
  queries: *field-inclusion-with-id-exclusion-expectations

- name: id inclusion
  projection:
    _id: 1
  
  queries:
    - query: _id
      allowed: true
    - query: foo
      allowed: false

- name: id exclusion
  projection:
    _id: false
  
  queries:
    - query: _id
      allowed: false
    - query: foo
      allowed: true

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
mongoid-9.0.5 spec/mongoid/attributes/projector_data/fields.yml
mongoid-8.1.9 spec/mongoid/attributes/projector_data/fields.yml
mongoid-8.0.9 spec/mongoid/attributes/projector_data/fields.yml
mongoid-9.0.4 spec/mongoid/attributes/projector_data/fields.yml
mongoid-8.1.8 spec/mongoid/attributes/projector_data/fields.yml
mongoid-8.1.7 spec/mongoid/attributes/projector_data/fields.yml
mongoid-9.0.3 spec/mongoid/attributes/projector_data/fields.yml
mongoid-8.1.6 spec/mongoid/attributes/projector_data/fields.yml
mongoid-9.0.2 spec/mongoid/attributes/projector_data/fields.yml
mongoid-9.0.1 spec/mongoid/attributes/projector_data/fields.yml
mongoid-9.0.0 spec/mongoid/attributes/projector_data/fields.yml
mongoid-8.0.8 spec/mongoid/attributes/projector_data/fields.yml
mongoid-8.1.5 spec/mongoid/attributes/projector_data/fields.yml
mongoid-8.1.4 spec/mongoid/attributes/projector_data/fields.yml
mongoid-8.0.7 spec/mongoid/attributes/projector_data/fields.yml
mongoid-8.1.3 spec/mongoid/attributes/projector_data/fields.yml
mongoid-8.1.2 spec/mongoid/attributes/projector_data/fields.yml
mongoid-8.0.6 spec/mongoid/attributes/projector_data/fields.yml
mongoid-7.5.4 spec/mongoid/attributes/projector_data/fields.yml
mongoid-8.1.1 spec/mongoid/attributes/projector_data/fields.yml