summaryrefslogtreecommitdiff
path: root/ext/librethinkdbxx/test/upstream/regression/2766.yaml
blob: ffb562fb896f5b4449981ef8e362d0e0eae5da99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
desc: Stop people treating ptypes as objects
tests:
  - cd: r.now()['epoch_time']
    js: r.now()('epoch_time')
    ot: err("ReqlQueryLogicError", "Cannot call `bracket` on objects of type `PTYPE<TIME>`.")
  - cd: r.now().get_field('epoch_time')
    ot: err("ReqlQueryLogicError", "Cannot call `get_field` on objects of type `PTYPE<TIME>`.")
  - cd: r.now().keys()
    ot: err("ReqlQueryLogicError", "Cannot call `keys` on objects of type `PTYPE<TIME>`.")
  - cd: r.now().pluck('epoch_time')
    ot: err("ReqlQueryLogicError", "Cannot call `pluck` on objects of type `PTYPE<TIME>`.")
  - cd: r.now().without('epoch_time')
    ot: err("ReqlQueryLogicError", "Cannot call `without` on objects of type `PTYPE<TIME>`.")
  - cd: r.now().merge({"foo":4})
    rb: r.now().merge({"foo"=>4})
    ot: err("ReqlQueryLogicError", "Cannot call `merge` on objects of type `PTYPE<TIME>`.")
  - cd: r.expr({"foo":4}).merge(r.now())
    rb: r.expr({"foo"=>4}).merge(r.now())
    ot: err("ReqlQueryLogicError", "Cannot merge objects of type `PTYPE<TIME>`.")
  - cd: r.now().has_fields('epoch_time')
    ot: err("ReqlQueryLogicError", "Cannot call `has_fields` on objects of type `PTYPE<TIME>`.")
  - cd: r.object().has_fields(r.time(2014, 7, 7, 'Z'))
    ot: err("ReqlQueryLogicError", "Invalid path argument `1404691200`.")
  - cd: r.expr(1).keys()
    ot: err("ReqlQueryLogicError", "Cannot call `keys` on objects of type `NUMBER`.")