@@ -112,6 +112,7 @@ describe('GET /api/workspaces blocked viewer forwarding', () => {
112112 pinnedWorkspaceIds : [ ] ,
113113 creationPolicy : { canCreate : false } ,
114114 }
115+ const routeContext = { params : Promise . resolve ( { } ) }
115116 const listRequest = ( ) =>
116117 createMockRequest ( 'GET' , undefined , { } , 'http://localhost/api/workspaces' )
117118
@@ -126,19 +127,19 @@ describe('GET /api/workspaces blocked viewer forwarding', () => {
126127
127128 it ( 'names the organization that can serve a viewer with nothing to pick' , async ( ) => {
128129 mockResolveRolledOutOrganizationId . mockResolvedValue ( 'org-1' )
129- const response = await GET ( listRequest ( ) )
130+ const response = await GET ( listRequest ( ) , routeContext )
130131 expect ( ( await response . json ( ) ) . forwardOrganizationId ) . toBe ( 'org-1' )
131132 } )
132133
133134 it ( 'leaves the blocked picker in place when no organization can serve them' , async ( ) => {
134135 mockResolveRolledOutOrganizationId . mockResolvedValue ( null )
135- const response = await GET ( listRequest ( ) )
136+ const response = await GET ( listRequest ( ) , routeContext )
136137 expect ( await response . json ( ) ) . not . toHaveProperty ( 'forwardOrganizationId' )
137138 } )
138139
139140 it ( 'still returns the list when the organization lookup fails' , async ( ) => {
140141 mockResolveRolledOutOrganizationId . mockRejectedValue ( new Error ( 'down' ) )
141- const response = await GET ( listRequest ( ) )
142+ const response = await GET ( listRequest ( ) , routeContext )
142143 expect ( response . status ) . toBe ( 200 )
143144 expect ( await response . json ( ) ) . not . toHaveProperty ( 'forwardOrganizationId' )
144145 } )
0 commit comments