update implementation and test for getAPNsFullUrlToUse

This commit is contained in:
2025-02-11 11:58:13 -08:00
parent bf1290bbc8
commit a74a6c995a
2 changed files with 7 additions and 7 deletions

View File

@@ -189,8 +189,8 @@ describe("NotificationService", () => {
});
describe('getAPNsFullUrlToUse', () => {
it('should return the production URL when NODE_ENV is set to "production"', () => {
process.env.NODE_ENV = 'production';
it('should return the production URL when APNS_IS_PRODUCTION is set to "1"', () => {
process.env.APNS_IS_PRODUCTION = "1";
const deviceId = 'testDeviceId';
const result = NotificationService.getAPNsFullUrlToUse(deviceId);
@@ -200,8 +200,8 @@ describe("NotificationService", () => {
expect(path).toBe(`/3/device/${deviceId}`);
});
it('should return the sandbox URL when NODE_ENV is not set to "production"', () => {
process.env.NODE_ENV = 'development';
it('should return the sandbox URL when APNS_IS_PRODUCTION is set to something other than 1', () => {
process.env.APNS_IS_PRODUCTION = "0";
const deviceId = 'testDeviceId';
const result = NotificationService.getAPNsFullUrlToUse(deviceId);