@@ -2485,22 +2485,20 @@ test('rest-helper-factory.generateFindEndpoint', function(t) {
2485
2485
} )
2486
2486
const joiStub = require ( 'joi' )
2487
2487
const joiObjectIdStub = function ( ) {
2488
- return function ( ) {
2489
- return {
2490
- required : function ( ) {
2491
- return 'TEST'
2492
- }
2488
+ return {
2489
+ required : function ( ) {
2490
+ return 'TEST'
2493
2491
}
2494
2492
}
2495
2493
}
2494
+ joiMongooseHelperStub . joiObjectId = joiObjectIdStub
2496
2495
const restHelperFactory = proxyquire (
2497
2496
'../../utilities/rest-helper-factory' ,
2498
2497
{
2499
2498
'./handler-helper-factory' : handlerHelperStubWrapper ,
2500
2499
'./query-helper' : queryHelperStub ,
2501
2500
'./joi-mongoose-helper' : joiMongooseHelperStub ,
2502
- joi : joiStub ,
2503
- 'joi-objectid' : joiObjectIdStub
2501
+ joi : joiStub
2504
2502
}
2505
2503
) ( Log , mongoose , server )
2506
2504
@@ -4218,22 +4216,20 @@ test('rest-helper-factory.generateDeleteOneEndpoint', function(t) {
4218
4216
const joiStub = require ( 'joi' )
4219
4217
4220
4218
const joiObjectIdStub = function ( ) {
4221
- return function ( ) {
4222
- return {
4223
- required : function ( ) {
4224
- return 'TEST'
4225
- }
4219
+ return {
4220
+ required : function ( ) {
4221
+ return 'TEST'
4226
4222
}
4227
4223
}
4228
4224
}
4225
+ joiMongooseHelperStub . joiObjectId = joiObjectIdStub
4229
4226
const restHelperFactory = proxyquire (
4230
4227
'../../utilities/rest-helper-factory' ,
4231
4228
{
4232
4229
'./handler-helper-factory' : handlerHelperStubWrapper ,
4233
4230
'./query-helper' : queryHelperStub ,
4234
4231
'./joi-mongoose-helper' : joiMongooseHelperStub ,
4235
- joi : joiStub ,
4236
- 'joi-objectid' : joiObjectIdStub
4232
+ joi : joiStub
4237
4233
}
4238
4234
) ( Log , mongoose , server )
4239
4235
@@ -5184,22 +5180,20 @@ test('rest-helper-factory.generateUpdateEndpoint', function(t) {
5184
5180
const joiStub = require ( 'joi' )
5185
5181
5186
5182
const joiObjectIdStub = function ( ) {
5187
- return function ( ) {
5188
- return {
5189
- required : function ( ) {
5190
- return 'TEST'
5191
- }
5183
+ return {
5184
+ required : function ( ) {
5185
+ return 'TEST'
5192
5186
}
5193
5187
}
5194
5188
}
5189
+ joiMongooseHelperStub . joiObjectId = joiObjectIdStub
5195
5190
const restHelperFactory = proxyquire (
5196
5191
'../../utilities/rest-helper-factory' ,
5197
5192
{
5198
5193
'./handler-helper-factory' : handlerHelperStubWrapper ,
5199
5194
'./query-helper' : queryHelperStub ,
5200
5195
'./joi-mongoose-helper' : joiMongooseHelperStub ,
5201
- joi : joiStub ,
5202
- 'joi-objectid' : joiObjectIdStub
5196
+ joi : joiStub
5203
5197
}
5204
5198
) ( Log , mongoose , server )
5205
5199
@@ -6537,22 +6531,20 @@ test('rest-helper-factory.generateAssociationAddOneEndpoint', function(t) {
6537
6531
} )
6538
6532
const joiStub = require ( 'joi' )
6539
6533
const joiObjectIdStub = function ( ) {
6540
- return function ( ) {
6541
- return {
6542
- required : function ( ) {
6543
- return 'TEST'
6544
- }
6534
+ return {
6535
+ required : function ( ) {
6536
+ return 'TEST'
6545
6537
}
6546
6538
}
6547
6539
}
6540
+ joiMongooseHelperStub . joiObjectId = joiObjectIdStub
6548
6541
const restHelperFactory = proxyquire (
6549
6542
'../../utilities/rest-helper-factory' ,
6550
6543
{
6551
6544
'./handler-helper-factory' : handlerHelperStubWrapper ,
6552
6545
'./query-helper' : queryHelperStub ,
6553
6546
'./joi-mongoose-helper' : joiMongooseHelperStub ,
6554
- joi : joiStub ,
6555
- 'joi-objectid' : joiObjectIdStub
6547
+ joi : joiStub
6556
6548
}
6557
6549
) ( Log , mongoose , server )
6558
6550
@@ -7840,22 +7832,20 @@ test('rest-helper-factory.generateAssociationRemoveOneEndpoint', function(t) {
7840
7832
} )
7841
7833
const joiStub = require ( 'joi' )
7842
7834
const joiObjectIdStub = function ( ) {
7843
- return function ( ) {
7844
- return {
7845
- required : function ( ) {
7846
- return 'TEST'
7847
- }
7835
+ return {
7836
+ required : function ( ) {
7837
+ return 'TEST'
7848
7838
}
7849
7839
}
7850
7840
}
7841
+ joiMongooseHelperStub . joiObjectId = joiObjectIdStub
7851
7842
const restHelperFactory = proxyquire (
7852
7843
'../../utilities/rest-helper-factory' ,
7853
7844
{
7854
7845
'./handler-helper-factory' : handlerHelperStubWrapper ,
7855
7846
'./query-helper' : queryHelperStub ,
7856
7847
'./joi-mongoose-helper' : joiMongooseHelperStub ,
7857
- joi : joiStub ,
7858
- 'joi-objectid' : joiObjectIdStub
7848
+ joi : joiStub
7859
7849
}
7860
7850
) ( Log , mongoose , server )
7861
7851
@@ -9118,18 +9108,16 @@ test('rest-helper-factory.generateAssociationAddManyEndpoint', function(t) {
9118
9108
const joiStub = require ( 'joi' )
9119
9109
9120
9110
const joiObjectIdStub = function ( ) {
9121
- return function ( ) {
9122
- return Joi . string ( ) . valid ( 'objectId' )
9123
- }
9111
+ return Joi . string ( ) . valid ( 'objectId' )
9124
9112
}
9113
+ joiMongooseHelperStub . joiObjectId = joiObjectIdStub
9125
9114
const restHelperFactory = proxyquire (
9126
9115
'../../utilities/rest-helper-factory' ,
9127
9116
{
9128
9117
'./handler-helper-factory' : handlerHelperStubWrapper ,
9129
9118
'./query-helper' : queryHelperStub ,
9130
9119
'./joi-mongoose-helper' : joiMongooseHelperStub ,
9131
- joi : joiStub ,
9132
- 'joi-objectid' : joiObjectIdStub
9120
+ joi : joiStub
9133
9121
}
9134
9122
) ( Log , mongoose , server )
9135
9123
@@ -9254,18 +9242,16 @@ test('rest-helper-factory.generateAssociationAddManyEndpoint', function(t) {
9254
9242
const joiStub = require ( 'joi' )
9255
9243
9256
9244
const joiObjectIdStub = function ( ) {
9257
- return function ( ) {
9258
- return Joi . string ( ) . valid ( 'objectId' )
9259
- }
9245
+ return Joi . string ( ) . valid ( 'objectId' )
9260
9246
}
9247
+ joiMongooseHelperStub . joiObjectId = joiObjectIdStub
9261
9248
const restHelperFactory = proxyquire (
9262
9249
'../../utilities/rest-helper-factory' ,
9263
9250
{
9264
9251
'./handler-helper-factory' : handlerHelperStubWrapper ,
9265
9252
'./query-helper' : queryHelperStub ,
9266
9253
'./joi-mongoose-helper' : joiMongooseHelperStub ,
9267
- joi : joiStub ,
9268
- 'joi-objectid' : joiObjectIdStub
9254
+ joi : joiStub
9269
9255
}
9270
9256
) ( Log , mongoose , server )
9271
9257
0 commit comments