@@ -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,6 +1058,15 @@ describe('index', function () {
10571058 requestMock . yieldsAsync ( null , fakeResponse ) ;
10581059 } ) ;
10591060
1061+ it ( 'successfully update status for PR' , ( ) => {
1062+ config . jobName = 'PR-1' ;
1063+ expectedOptions . body . description = 'Screwdriver/123/PR' ;
1064+
1065+ return scm . updateCommitStatus ( config ) . then ( ( ) => {
1066+ assert . calledWith ( requestMock , expectedOptions ) ;
1067+ } ) ;
1068+ } ) ;
1069+
10601070 it ( 'successfully update status' , ( ) =>
10611071 scm . updateCommitStatus ( config ) . then ( ( ) => {
10621072 assert . calledWith ( requestMock , expectedOptions ) ;
@@ -1068,7 +1078,7 @@ describe('index', function () {
10681078 delete config . jobName ;
10691079
10701080 expectedOptions . body . state = 'STOPPED' ;
1071- expectedOptions . body . description = 'Screwdriver' ;
1081+ expectedOptions . body . description = 'Screwdriver/123 ' ;
10721082
10731083 return scm . updateCommitStatus ( config ) . then ( ( ) => {
10741084 assert . calledWith ( requestMock , expectedOptions ) ;
0 commit comments