File tree Expand file tree Collapse file tree
src/app/core/record-works Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -150,12 +150,18 @@ describe('RecordWorksService', () => {
150150 done ( )
151151 } )
152152
153- const req = httpTestingController . expectOne (
153+ const wizardReq = httpTestingController . expectOne (
154154 runtimeEnvironment . API_WEB +
155155 'workspace/retrieve-works-search-and-link-wizard.json'
156156 )
157- expect ( req . request . method ) . toBe ( 'GET' )
158- req . flush ( listPayload )
157+ expect ( wizardReq . request . method ) . toBe ( 'GET' )
158+ wizardReq . flush ( listPayload )
159+
160+ // Service also requests localize .properties when CERTIFIED_LINKS_LOCALIZE_BASE_URL is set
161+ const localizeReqs = httpTestingController . match ( ( req ) =>
162+ req . url . includes ( 'works-search-and-link' ) && req . url . endsWith ( '.properties' )
163+ )
164+ localizeReqs . forEach ( ( r ) => r . flush ( '' ) )
159165 } )
160166
161167 it ( 'returns empty certified and more lists when API returns empty array' , ( done ) => {
@@ -166,11 +172,16 @@ describe('RecordWorksService', () => {
166172 done ( )
167173 } )
168174
169- const req = httpTestingController . expectOne (
175+ const wizardReq = httpTestingController . expectOne (
170176 runtimeEnvironment . API_WEB +
171177 'workspace/retrieve-works-search-and-link-wizard.json'
172178 )
173- req . flush ( [ ] )
179+ wizardReq . flush ( [ ] )
180+
181+ const localizeReqs = httpTestingController . match ( ( req ) =>
182+ req . url . includes ( 'works-search-and-link' ) && req . url . endsWith ( '.properties' )
183+ )
184+ localizeReqs . forEach ( ( r ) => r . flush ( '' ) )
174185 } )
175186 } )
176187} )
You can’t perform that action at this time.
0 commit comments