File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,11 +32,19 @@ describe('signRequestUuid utils', () => {
3232 expect ( getCurrentSignerSignRequestUuid ( undefined , 'fallback-uuid' ) ) . toBe ( 'fallback-uuid' )
3333 } )
3434
35- it ( 'returns the file uuid for approver signing routes' , ( ) => {
35+ it ( 'prefers the current signer sign_request_uuid for approver-capable routes' , ( ) => {
3636 expect ( getSigningRouteUuid ( {
3737 uuid : 'file-uuid' ,
3838 settings : { isApprover : true } ,
3939 signers : [ { me : true , sign_request_uuid : 'sign-request-uuid' } ] ,
40+ } ) ) . toBe ( 'sign-request-uuid' )
41+ } )
42+
43+ it ( 'falls back to file uuid for approver signing routes when signer uuid is unavailable' , ( ) => {
44+ expect ( getSigningRouteUuid ( {
45+ uuid : 'file-uuid' ,
46+ settings : { isApprover : true } ,
47+ signers : [ ] ,
4048 } ) ) . toBe ( 'file-uuid' )
4149 } )
4250
@@ -57,4 +65,4 @@ describe('signRequestUuid utils', () => {
5765 it ( 'falls back to numeric id for validation routes when uuid is unavailable' , ( ) => {
5866 expect ( getValidationRouteUuid ( { id : 42 } ) ) . toBe ( 42 )
5967 } )
60- } )
68+ } )
You can’t perform that action at this time.
0 commit comments