diff --git a/x-pack/plugins/reporting/server/lib/store/store.test.ts b/x-pack/plugins/reporting/server/lib/store/store.test.ts index d3106acc54657..e6c4eb7346460 100644 --- a/x-pack/plugins/reporting/server/lib/store/store.test.ts +++ b/x-pack/plugins/reporting/server/lib/store/store.test.ts @@ -164,7 +164,7 @@ describe('ReportingStore', () => { }); }); - it('allows username string to be `null`', async () => { + it('allows username string to be `false`', async () => { // setup callClusterStub.withArgs('indices.exists').resolves(false); callClusterStub @@ -184,7 +184,7 @@ describe('ReportingStore', () => { attempts: 0, browser_type: undefined, completed_at: undefined, - created_by: null, + created_by: false, jobtype: 'unknowntype', max_attempts: undefined, payload: {}, diff --git a/x-pack/plugins/reporting/server/routes/lib/authorized_user_pre_routing.test.ts b/x-pack/plugins/reporting/server/routes/lib/authorized_user_pre_routing.test.ts index f4591f8436bd2..50780a577af02 100644 --- a/x-pack/plugins/reporting/server/routes/lib/authorized_user_pre_routing.test.ts +++ b/x-pack/plugins/reporting/server/routes/lib/authorized_user_pre_routing.test.ts @@ -46,7 +46,7 @@ describe('authorized_user_pre_routing', function () { mockCore = await createMockReportingCore(mockReportingConfig); }); - it('should return from handler with a "null" user when security plugin is not found', async function () { + it('should return from handler with a "false" user when security plugin is not found', async function () { mockCore.getPluginSetupDeps = () => (({ // @ts-ignore @@ -58,7 +58,7 @@ describe('authorized_user_pre_routing', function () { let handlerCalled = false; authorizedUserPreRouting((user: unknown) => { - expect(user).toBe(null); // verify the user is a null value + expect(user).toBe(false); // verify the user is a false value handlerCalled = true; return Promise.resolve({ status: 200, options: {} }); })(getMockContext(), getMockRequest(), mockResponseFactory); @@ -66,7 +66,7 @@ describe('authorized_user_pre_routing', function () { expect(handlerCalled).toBe(true); }); - it('should return from handler with a "null" user when security is disabled', async function () { + it('should return from handler with a "false" user when security is disabled', async function () { mockCore.getPluginSetupDeps = () => (({ // @ts-ignore @@ -82,7 +82,7 @@ describe('authorized_user_pre_routing', function () { let handlerCalled = false; authorizedUserPreRouting((user: unknown) => { - expect(user).toBe(null); // verify the user is a null value + expect(user).toBe(false); // verify the user is a false value handlerCalled = true; return Promise.resolve({ status: 200, options: {} }); })(getMockContext(), getMockRequest(), mockResponseFactory);