mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 16:00:32 +00:00
update implementation and test for getAPNsFullUrlToUse
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user