@@ -1034,7 +1034,8 @@ describe('index', function () {
10341034 buildStatus : 'SUCCESS' ,
10351035 token : 'bearerToken' ,
10361036 url : 'http://valid.url' ,
1037- jobName : 'main'
1037+ jobName : 'main' ,
1038+ pipelineId : 123
10381039 } ;
10391040 apiUrl = `${ API_URL_V2 } /repositories/repoId/commit/${ config . sha } /statuses/build` ;
10401041 fakeResponse = {
@@ -1048,7 +1049,7 @@ describe('index', function () {
10481049 url : config . url ,
10491050 state : 'SUCCESSFUL' ,
10501051 key : config . sha ,
1051- description : 'Screwdriver/main'
1052+ description : 'Screwdriver/123/ main'
10521053 } ,
10531054 auth : {
10541055 bearer : 'bearerToken' // Decoded access token
@@ -1057,24 +1058,21 @@ describe('index', function () {
10571058 requestMock . yieldsAsync ( null , fakeResponse ) ;
10581059 } ) ;
10591060
1060- it ( 'successfully update status' , ( ) =>
1061- scm . updateCommitStatus ( config ) . then ( ( ) => {
1062- assert . calledWith ( requestMock , expectedOptions ) ;
1063- } )
1064- ) ;
1065-
1066- it ( 'successfully update status with correct values' , ( ) => {
1067- config . buildStatus = 'ABORTED' ;
1068- delete config . jobName ;
1069-
1070- expectedOptions . body . state = 'STOPPED' ;
1071- expectedOptions . body . description = 'Screwdriver' ;
1061+ it ( 'successfully update status for PR' , ( ) => {
1062+ config . jobName = 'PR-1' ;
1063+ expectedOptions . body . description = 'Screwdriver/123/PR' ;
10721064
10731065 return scm . updateCommitStatus ( config ) . then ( ( ) => {
10741066 assert . calledWith ( requestMock , expectedOptions ) ;
10751067 } ) ;
10761068 } ) ;
10771069
1070+ it ( 'successfully update status' , ( ) =>
1071+ scm . updateCommitStatus ( config ) . then ( ( ) => {
1072+ assert . calledWith ( requestMock , expectedOptions ) ;
1073+ } )
1074+ ) ;
1075+
10781076 it ( 'rejects if status code is not 201 or 200' , ( ) => {
10791077 fakeResponse = {
10801078 statusCode : 401 ,
0 commit comments