2017-11-02 07:05:11 -07:00

40 lines
1.2 KiB
YAML

desc: 1081 union two streams
tests:
- rb: r.db('test').table_create('t1081')
def: t = r.db('test').table('t1081')
- rb: t.insert([{'id':0}, {'id':1}])
- rb: r([]).union([]).typeof
ot: ("ARRAY")
- rb: t.union(t).typeof
ot: ("STREAM")
- rb: t.union([]).typeof
ot: ("STREAM")
- rb: r.db('test').table_drop('t1081')
- rb: r.table_create('1081')
ot: partial({'tables_created':1})
- rb: r.table('1081').insert({:password => 0})[:inserted]
ot: 1
- rb: r.table('1081').index_create('password')
ot: ({'created':1})
- rb: r.table('1081').index_wait('password').pluck('index', 'ready')
ot: ([{'ready':True, 'index':'password'}])
- rb: r.table('1081').get_all(0, :index => 'password').typeof
ot: ("SELECTION<STREAM>")
- rb: r.table('1081').get_all(0, :index => 'password').without('id').typeof
ot: ("STREAM")
- rb: r.table('1081').get_all(0, 0, :index => 'password').typeof
ot: ("SELECTION<STREAM>")
- rb: r.table('1081').get_all(0, 0, :index => 'password').without('id').typeof
ot: ("STREAM")
- rb: r.table_drop('1081')
ot: partial({'tables_dropped':1})