@@ -216,15 +216,19 @@ describe('postgresql connector', function() {
216
216
. then ( ( post ) => {
217
217
postId = post . id ;
218
218
post . should . have . property ( 'tags' ) ;
219
- post . tags [ 1 ] . should . eql ( 'AB' ) ;
219
+ post . tags . should . be . Array ( ) ;
220
+ post . tags . length . should . eql ( 2 ) ;
221
+ post . tags . should . eql ( [ 'AA' , 'AB' ] ) ;
220
222
return Post . updateAll ( { where : { id : postId } } , { tags : [ 'AA' , 'AC' ] } ) ;
221
223
} )
222
- . then ( ( wooot ) => {
224
+ . then ( ( ) => {
223
225
return Post . findOne ( { where : { id : postId } } ) ;
224
226
} )
225
227
. then ( ( post ) => {
226
228
post . should . have . property ( 'tags' ) ;
227
- post . tags [ 1 ] . should . eql ( 'AC' ) ;
229
+ post . tags . should . be . Array ( ) ;
230
+ post . tags . length . should . eql ( 2 ) ;
231
+ post . tags . should . eql ( [ 'AA' , 'AC' ] ) ;
228
232
done ( ) ;
229
233
} )
230
234
. catch ( ( error ) => {
@@ -238,15 +242,20 @@ describe('postgresql connector', function() {
238
242
. then ( ( post ) => {
239
243
postId = post . id ;
240
244
post . should . have . property ( 'categories' ) ;
241
- post . categories [ 1 ] . should . eql ( 'AB' ) ;
245
+ post . should . have . property ( 'categories' ) ;
246
+ post . categories . should . be . Array ( ) ;
247
+ post . categories . length . should . eql ( 2 ) ;
248
+ post . categories . should . eql ( [ 'AA' , 'AB' ] ) ;
242
249
return Post . updateAll ( { where : { id : postId } } , { categories : [ 'AA' , 'AC' ] } ) ;
243
250
} )
244
- . then ( ( wooot ) => {
251
+ . then ( ( ) => {
245
252
return Post . findOne ( { where : { id : postId } } ) ;
246
253
} )
247
254
. then ( ( post ) => {
248
255
post . should . have . property ( 'categories' ) ;
249
- post . categories [ 1 ] . should . eql ( 'AC' ) ;
256
+ post . categories . should . be . Array ( ) ;
257
+ post . categories . length . should . eql ( 2 ) ;
258
+ post . categories . should . eql ( [ 'AA' , 'AC' ] ) ;
250
259
done ( ) ;
251
260
} )
252
261
. catch ( ( error ) => {
0 commit comments