@@ -172,33 +172,33 @@ describe('app', () => {
172
172
// Stub the calls to API server
173
173
stub = sinon . stub ( request , 'get' ) ;
174
174
const stubArgs = {
175
- url : `${ config . API_BASE_URL } ${ config . API_URL_PROJECTS } /1` ,
175
+ url : `${ config . API_URL_PROJECTS } /1` ,
176
176
} ;
177
177
stub . withArgs ( sinon . match . has ( 'url' , stubArgs . url ) )
178
178
. yields ( null , { statusCode : 200 } , sampleProjects . project1 ) ;
179
179
180
- stubArgs . url = `${ config . API_BASE_URL } ${ config . API_URL_PROJECTS } /1000` ;
180
+ stubArgs . url = `${ config . API_URL_PROJECTS } /1000` ;
181
181
stub . withArgs ( sinon . match . has ( 'url' , stubArgs . url ) )
182
182
. yields ( null , { statusCode : 404 } ) ;
183
183
184
- stubArgs . url = `${ config . API_BASE_URL } ${ config . API_URL_MEMBERS } /_search/?query=userId:1` ;
184
+ stubArgs . url = `${ config . API_URL_MEMBERS } /_search/?query=userId:1` ;
185
185
stub . withArgs ( sinon . match . has ( 'url' , stubArgs . url ) )
186
186
. yields ( null , { statusCode : 200 } , sampleUsers . user1 ) ;
187
187
188
- stubArgs . url = `${ config . API_BASE_URL } ${ config . API_URL_USERS } /1000` ;
188
+ stubArgs . url = `${ config . API_URL_USERS } /1000` ;
189
189
stub . withArgs ( sinon . match . has ( 'url' , stubArgs . url ) )
190
190
. yields ( null , { statusCode : 404 } ) ;
191
191
192
- stubArgs . url = `${ config . API_BASE_URL } ${ config . API_URL_MEMBERS } /_search/?query=userId:40051331` ;
192
+ stubArgs . url = `${ config . API_URL_MEMBERS } /_search/?query=userId:40051331` ;
193
193
stub . withArgs ( sinon . match . has ( 'url' , stubArgs . url ) )
194
194
. yields ( null , { statusCode : 200 } , sampleUsers . user1 ) ;
195
195
196
- stubArgs . url = `${ config . API_BASE_URL } ${ config . API_URL_MEMBERS } /_search/?query=userId:50051333` ;
196
+ stubArgs . url = `${ config . API_URL_MEMBERS } /_search/?query=userId:50051333` ;
197
197
stub . withArgs ( sinon . match . has ( 'url' , stubArgs . url ) )
198
198
. yields ( null , { statusCode : 200 } , sampleUsers . user1 ) ;
199
199
200
200
postStub = sinon . stub ( request , 'post' ) ;
201
- postStub . withArgs ( sinon . match . has ( 'url' , `${ config . API_BASE_URL } ${ config . API_URL_AUTHORIZATIONS } /` ) )
201
+ postStub . withArgs ( sinon . match . has ( 'url' , `${ config . API_URL_AUTHORIZATIONS } /` ) )
202
202
. yields ( null , { statusCode : 200 } , sampleAuth ) ;
203
203
204
204
postStub . withArgs ( sinon . match . has ( 'url' , config . TC_SLACK_WEBHOOK_URL ) )
@@ -256,7 +256,7 @@ describe('app', () => {
256
256
const callbackCount = 1 ;
257
257
request . get . restore ( ) ;
258
258
stub = sinon . stub ( request , 'get' ) ;
259
- stub . withArgs ( sinon . match . has ( 'url' , `${ config . API_BASE_URL } ${ config . API_URL_MEMBERS } /_search/?query=userId:8547900` ) )
259
+ stub . withArgs ( sinon . match . has ( 'url' , `${ config . API_URL_MEMBERS } /_search/?query=userId:8547900` ) )
260
260
. yields ( null , { statusCode : 200 } , sampleUsers . user1 ) ;
261
261
262
262
sendTestEvent ( sampleEvents . updatedInReview , 'project.updated' ) ;
@@ -285,7 +285,7 @@ describe('app', () => {
285
285
it ( 'should create `Project.Reviewed` and `Project.AvailableToClaim` and copilot slack notifications and repost after delay till TTL' , ( done ) => {
286
286
request . get . restore ( ) ;
287
287
stub = sinon . stub ( request , 'get' ) ;
288
- stub . withArgs ( sinon . match . has ( 'url' , `${ config . API_BASE_URL } ${ config . API_URL_PROJECTS } /1` ) )
288
+ stub . withArgs ( sinon . match . has ( 'url' , `${ config . API_URL_PROJECTS } /1` ) )
289
289
. yields ( null , { statusCode : 200 } , sampleProjects . projectTest ) ;
290
290
291
291
let assertCount = 0 ;
@@ -372,9 +372,9 @@ describe('app', () => {
372
372
it ( 'should create `Project.Member.CopilotJoined` notification and slack copilot joined notification' , ( done ) => {
373
373
request . get . restore ( ) ;
374
374
stub = sinon . stub ( request , 'get' ) ;
375
- stub . withArgs ( sinon . match . has ( 'url' , `${ config . API_BASE_URL } ${ config . API_URL_PROJECTS } /1` ) )
375
+ stub . withArgs ( sinon . match . has ( 'url' , `${ config . API_URL_PROJECTS } /1` ) )
376
376
. yields ( null , { statusCode : 200 } , sampleProjects . projectTest ) ;
377
- stub . withArgs ( sinon . match . has ( 'url' , `${ config . API_BASE_URL } ${ config . API_URL_MEMBERS } /_search/?query=userId:40051331` ) )
377
+ stub . withArgs ( sinon . match . has ( 'url' , `${ config . API_URL_MEMBERS } /_search/?query=userId:40051331` ) )
378
378
. yields ( null , { statusCode : 200 } , sampleUsers . user1 ) ;
379
379
380
380
sendTestEvent ( sampleEvents . memberAddedCopilot , 'project.member.added' ) ;
0 commit comments