@@ -36,6 +36,14 @@ describe('Memory connector with mocked discovery', function() {
36
36
nullable : 0 ,
37
37
generated : true ,
38
38
} ,
39
+ {
40
+ owner : 'STRONGLOOP' ,
41
+ tableName : 'INVENTORY' ,
42
+ columnName : 'PRODUCT_TYPE' ,
43
+ dataType : "ENUM('IMPORTED', 'LOCAL')" ,
44
+ nullable : 1 ,
45
+ generated : false ,
46
+ } ,
39
47
{
40
48
owner : 'STRONGLOOP' ,
41
49
tableName : 'INVENTORY' ,
@@ -84,7 +92,7 @@ describe('Memory connector with mocked discovery', function() {
84
92
const s = schemas [ 'STRONGLOOP.INVENTORY' ] ;
85
93
s . name . should . be . eql ( 'Inventory' ) ;
86
94
Object . keys ( s . properties ) . should . be . eql (
87
- [ 'productId' , 'locationId' , 'available' , 'total' ] ,
95
+ [ 'productId' , 'productType' , ' locationId', 'available' , 'total' ] ,
88
96
) ;
89
97
done ( ) ;
90
98
} ) ;
@@ -110,7 +118,7 @@ describe('Memory connector with mocked discovery', function() {
110
118
const s = schemas [ 'STRONGLOOP.INVENTORY' ] ;
111
119
s . name . should . be . eql ( 'Inventory' ) ;
112
120
Object . keys ( s . properties ) . should . be . eql (
113
- [ 'PRODUCT_ID' , 'LOCATION_ID' , 'AVAILABLE' , 'TOTAL' ] ,
121
+ [ 'PRODUCT_ID' , 'PRODUCT_TYPE' , ' LOCATION_ID', 'AVAILABLE' , 'TOTAL' ] ,
114
122
) ;
115
123
done ( ) ;
116
124
} ) ;
@@ -128,7 +136,7 @@ describe('Memory connector with mocked discovery', function() {
128
136
const s = schemas [ 'STRONGLOOP.INVENTORY' ] ;
129
137
s . name . should . be . eql ( 'inventory' ) ;
130
138
Object . keys ( s . properties ) . should . be . eql (
131
- [ 'product_id' , 'location_id' , 'available' , 'total' ] ,
139
+ [ 'product_id' , 'product_type' , ' location_id', 'available' , 'total' ] ,
132
140
) ;
133
141
done ( ) ;
134
142
} ) ;
@@ -142,7 +150,7 @@ describe('Memory connector with mocked discovery', function() {
142
150
const s = schemas [ 'STRONGLOOP.INVENTORY' ] ;
143
151
s . name . should . be . eql ( 'INVENTORY' ) ;
144
152
Object . keys ( s . properties ) . should . be . eql (
145
- [ 'PRODUCT_ID' , 'LOCATION_ID' , 'AVAILABLE' , 'TOTAL' ] ,
153
+ [ 'PRODUCT_ID' , 'PRODUCT_TYPE' , ' LOCATION_ID', 'AVAILABLE' , 'TOTAL' ] ,
146
154
) ;
147
155
done ( ) ;
148
156
} ) ;
@@ -202,7 +210,7 @@ describe('Memory connector with mocked discovery', function() {
202
210
s . name . should . be . eql ( 'Inventory' ) ;
203
211
204
212
Object . keys ( s . properties ) . should . be . eql (
205
- [ 'productId' , 'locationId' , 'available' , 'total' ] ,
213
+ [ 'productId' , 'productType' , ' locationId', 'available' , 'total' ] ,
206
214
) ;
207
215
done ( ) ;
208
216
} )
@@ -235,13 +243,32 @@ describe('Memory connector with mocked discovery', function() {
235
243
dataType : 'int' ,
236
244
nullable : 1 ,
237
245
generated : false ,
246
+ value : '\'imported\',\' local\',' ,
238
247
} ,
239
248
precision : 10 ,
240
249
required : false ,
241
250
scale : 0 ,
242
251
type : undefined ,
243
252
generated : false ,
244
253
} ,
254
+ productType : {
255
+ type : undefined ,
256
+ required : false ,
257
+ jsonSchema : { nullable : true } ,
258
+ length : undefined ,
259
+ precision : undefined ,
260
+ scale : undefined ,
261
+ generated : false ,
262
+ memory : {
263
+ columnName : 'PRODUCT_TYPE' ,
264
+ dataType : 'ENUM(\'IMPORTED\', \'LOCAL\')' ,
265
+ dataLength : undefined ,
266
+ dataPrecision : undefined ,
267
+ dataScale : undefined ,
268
+ nullable : 1 ,
269
+ generated : false ,
270
+ } ,
271
+ } ,
245
272
locationId : {
246
273
length : 20 ,
247
274
jsonSchema : {
0 commit comments