@@ -4,7 +4,7 @@ import { createOrRenewCookie } from '../client/userFeatures/cookies/cookieHelper
44import { HIDE_SUPPORT_MESSAGING_COOKIE } from '../client/userFeatures/cookies/hideSupportMessaging' ;
55import { USER_BENEFITS_EXPIRY_COOKIE } from '../client/userFeatures/cookies/userBenefitsExpiry' ;
66import {
7- buildRequestHeaders ,
7+ getAuthHeaders ,
88 getLastOneOffContributionTimestamp ,
99 hasHideSupportMessagingCookie ,
1010 isRecentOneOffContributor ,
@@ -216,23 +216,23 @@ const getAuthStatus = getAuthStatus_ as jest.MockedFunction<
216216 typeof getAuthStatus_
217217> ;
218218
219- describe ( 'buildRequestHeaders ' , ( ) => {
219+ describe ( 'getAuthHeaders ' , ( ) => {
220220 beforeEach ( ( ) => {
221221 jest . clearAllMocks ( ) ;
222222 } ) ;
223223
224224 it ( 'returns undefined when user has not consented to targeting' , async ( ) => {
225225 ( onConsent as jest . Mock ) . mockResolvedValue ( { canTarget : false } ) ;
226226
227- const result = await buildRequestHeaders ( ) ;
227+ const result = await getAuthHeaders ( ) ;
228228
229229 expect ( result ) . toBeUndefined ( ) ;
230230 } ) ;
231231
232232 it ( 'returns undefined when consent check fails' , async ( ) => {
233233 ( onConsent as jest . Mock ) . mockRejectedValue ( new Error ( 'Consent error' ) ) ;
234234
235- const result = await buildRequestHeaders ( ) ;
235+ const result = await getAuthHeaders ( ) ;
236236
237237 expect ( result ) . toBeUndefined ( ) ;
238238 } ) ;
@@ -241,7 +241,7 @@ describe('buildRequestHeaders', () => {
241241 ( onConsent as jest . Mock ) . mockResolvedValue ( { canTarget : true } ) ;
242242 ( getAuthStatus as jest . Mock ) . mockResolvedValue ( { kind : 'SignedOut' } ) ;
243243
244- const result = await buildRequestHeaders ( ) ;
244+ const result = await getAuthHeaders ( ) ;
245245
246246 expect ( result ) . toBeUndefined ( ) ;
247247 } ) ;
@@ -253,7 +253,7 @@ describe('buildRequestHeaders', () => {
253253 accessToken : { accessToken : 'token' } ,
254254 } ) ;
255255
256- const result = await buildRequestHeaders ( ) ;
256+ const result = await getAuthHeaders ( ) ;
257257
258258 expect ( result ) . toEqual ( {
259259 Authorization : 'Bearer token' ,
0 commit comments