@@ -252,8 +252,8 @@ describe('index', function () {
252252 const expected = {
253253 type : 'pr' ,
254254 action : 'opened' ,
255- username : 'robin ' ,
256- checkoutUrl : 'https://batman @bitbucket.org/batman/test.git' ,
255+ username : '{2dca4f54-ab3f-400c-a777-c059e1ac0394} ' ,
256+ checkoutUrl : 'https://%7B2dca4f54-ab3f-400c-a777-c059e1ac0394%7D @bitbucket.org/batman/test.git' , // eslint-disable-line max-len
257257 branch : 'master' ,
258258 sha : '40171b678527' ,
259259 prNum : 3 ,
@@ -274,8 +274,8 @@ describe('index', function () {
274274 const expected = {
275275 type : 'pr' ,
276276 action : 'synchronized' ,
277- username : 'batman ' ,
278- checkoutUrl : 'https://batman @bitbucket.org/batman/test.git' ,
277+ username : '{2dca4f54-ab3f-400c-a777-c059e1ac0394} ' ,
278+ checkoutUrl : 'https://%7B2dca4f54-ab3f-400c-a777-c059e1ac0394%7D @bitbucket.org/batman/test.git' , // eslint-disable-line max-len
279279 branch : 'master' ,
280280 sha : 'caeae8cd5fc9' ,
281281 prNum : 7 ,
@@ -296,8 +296,8 @@ describe('index', function () {
296296 const expected = {
297297 type : 'pr' ,
298298 action : 'closed' ,
299- username : 'robin ' ,
300- checkoutUrl : 'https://batman @bitbucket.org/batman/test.git' ,
299+ username : '{2dca4f54-ab3f-400c-a777-c059e1ac0394} ' ,
300+ checkoutUrl : 'https://%7B2dca4f54-ab3f-400c-a777-c059e1ac0394%7D @bitbucket.org/batman/test.git' , // eslint-disable-line max-len
301301 branch : 'master' ,
302302 sha : '40171b678527' ,
303303 prNum : 3 ,
@@ -318,8 +318,8 @@ describe('index', function () {
318318 const expected = {
319319 type : 'pr' ,
320320 action : 'closed' ,
321- username : 'robin ' ,
322- checkoutUrl : 'https://batman @bitbucket.org/batman/test.git' ,
321+ username : '{2dca4f54-ab3f-400c-a777-c059e1ac0394} ' ,
322+ checkoutUrl : 'https://%7B2dca4f54-ab3f-400c-a777-c059e1ac0394%7D @bitbucket.org/batman/test.git' , // eslint-disable-line max-len
323323 branch : 'master' ,
324324 sha : '40171b678527' ,
325325 prNum : 3 ,
@@ -340,8 +340,8 @@ describe('index', function () {
340340 const expected = {
341341 type : 'repo' ,
342342 action : 'push' ,
343- username : 'robin ' ,
344- checkoutUrl : 'https://batman @bitbucket.org/batman/test.git' ,
343+ username : '{2dca4f54-ab3f-400c-a777-c059e1ac0394} ' ,
344+ checkoutUrl : 'https://%7B2dca4f54-ab3f-400c-a777-c059e1ac0394%7D @bitbucket.org/batman/test.git' , // eslint-disable-line max-len
345345 branch : 'stuff' ,
346346 sha : '9ff49b2d1437567cad2b5fed7a0706472131e927' ,
347347 lastCommitMessage : 'testpayload\n' ,
@@ -386,7 +386,7 @@ describe('index', function () {
386386 } ) ;
387387
388388 describe ( 'decorateAuthor' , ( ) => {
389- const apiUrl = `${ API_URL_V2 } /users/batman ` ;
389+ const apiUrl = `${ API_URL_V2 } /users/%7B4f1a9b7f-586e-4e80-b9eb-a7589b4a165f%7D ` ;
390390 const expectedOptions = {
391391 url : apiUrl ,
392392 method : 'GET' ,
@@ -401,12 +401,11 @@ describe('index', function () {
401401 fakeResponse = {
402402 statusCode : 200 ,
403403 body : {
404- username : 'batman' ,
405404 display_name : 'Batman' ,
406405 uuid : '{4f1a9b7f-586e-4e80-b9eb-a7589b4a165f}' ,
407406 links : {
408407 html : {
409- href : 'https://bitbucket.org/batman/'
408+ href : 'https://bitbucket.org/%7B4f1a9b7f-586e-4e80-b9eb-a7589b4a165f%7D/' // eslint-disable-line max-len
410409 } ,
411410 avatar : {
412411 href : 'https://bitbucket.org/account/batman/avatar/32/'
@@ -419,14 +418,14 @@ describe('index', function () {
419418
420419 it ( 'resolves to correct decorated author' , ( ) => {
421420 const expected = {
422- url : 'https://bitbucket.org/batman /' ,
421+ url : 'https://bitbucket.org/%7B4f1a9b7f-586e-4e80-b9eb-a7589b4a165f%7D /' ,
423422 name : 'Batman' ,
424- username : 'batman ' ,
423+ username : '{4f1a9b7f-586e-4e80-b9eb-a7589b4a165f} ' ,
425424 avatar : 'https://bitbucket.org/account/batman/avatar/32/'
426425 } ;
427426
428427 return scm . decorateAuthor ( {
429- username : 'batman ' ,
428+ username : '{4f1a9b7f-586e-4e80-b9eb-a7589b4a165f} ' ,
430429 token
431430 } ) . then ( ( decorated ) => {
432431 assert . calledWith ( requestMock , expectedOptions ) ;
@@ -448,7 +447,7 @@ describe('index', function () {
448447 requestMock . yieldsAsync ( null , fakeResponse , fakeResponse . body ) ;
449448
450449 return scm . decorateAuthor ( {
451- username : 'batman ' ,
450+ username : '{4f1a9b7f-586e-4e80-b9eb-a7589b4a165f} ' ,
452451 token
453452 } ) . then ( ( ) => {
454453 assert . fail ( 'Should not get here' ) ;
@@ -464,7 +463,7 @@ describe('index', function () {
464463 requestMock . yieldsAsync ( err ) ;
465464
466465 return scm . decorateAuthor ( {
467- username : 'batman ' ,
466+ username : '{4f1a9b7f-586e-4e80-b9eb-a7589b4a165f} ' ,
468467 token
469468 } ) . then ( ( ) => {
470469 assert . fail ( 'Should not get here' ) ;
@@ -574,7 +573,7 @@ describe('index', function () {
574573 const sha = '1111111111111111111111111111111111111111' ;
575574 const repoUrl =
576575 `${ API_URL_V2 } /repositories/repoId/commit/${ sha } ` ;
577- const authorUrl = `${ API_URL_V2 } /users/username ` ;
576+ const authorUrl = `${ API_URL_V2 } /users/%7Buuid%7D ` ;
578577 const selfLink = `https://bitbucket.org/repoId/commits/${ sha } ` ;
579578 const repoOptions = {
580579 url : repoUrl ,
@@ -607,23 +606,22 @@ describe('index', function () {
607606 } ,
608607 author : {
609608 user : {
610- username : 'username '
609+ uuid : '{uuid} '
611610 }
612611 }
613612 }
614613 } ;
615614 fakeAuthorResponse = {
616615 statusCode : 200 ,
617616 body : {
618- username : 'username' ,
619617 display_name : 'displayName' ,
620- uuid : 'uuid' ,
618+ uuid : '{ uuid} ' ,
621619 links : {
622620 html : {
623- href : 'https://bitbucket.org/username /'
621+ href : 'https://bitbucket.org/%7Buuid%7D /'
624622 } ,
625623 avatar : {
626- href : 'https://bitbucket.org/account/username /avatar/32/'
624+ href : 'https://bitbucket.org/account/%7Buuid%7D /avatar/32/'
627625 }
628626 }
629627 }
@@ -639,10 +637,10 @@ describe('index', function () {
639637 url : selfLink ,
640638 message : 'testing' ,
641639 author : {
642- url : 'https://bitbucket.org/username /' ,
640+ url : 'https://bitbucket.org/%7Buuid%7D /' ,
643641 name : 'displayName' ,
644- username : 'username ' ,
645- avatar : 'https://bitbucket.org/account/username /avatar/32/'
642+ username : '{uuid} ' ,
643+ avatar : 'https://bitbucket.org/account/%7Buuid%7D /avatar/32/'
646644 }
647645 } ;
648646
0 commit comments