From fc4fca8bf086b064ab70a8cf6602ddc8fdf74f70 Mon Sep 17 00:00:00 2001 From: Nidhi Date: Wed, 4 Nov 2020 12:57:17 +0530 Subject: [PATCH] Added fallback email to new organization from user email (#1536) --- .../com/appsmith/server/services/OrganizationServiceImpl.java | 4 ++++ .../com/appsmith/server/services/OrganizationServiceTest.java | 1 + 2 files changed, 5 insertions(+) diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/OrganizationServiceImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/OrganizationServiceImpl.java index d373ac009b..aef7daf353 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/OrganizationServiceImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/OrganizationServiceImpl.java @@ -147,6 +147,10 @@ public class OrganizationServiceImpl extends BaseService setSlugMono; if (organization.getName() == null) { setSlugMono = Mono.just(organization); diff --git a/app/server/appsmith-server/src/test/java/com/appsmith/server/services/OrganizationServiceTest.java b/app/server/appsmith-server/src/test/java/com/appsmith/server/services/OrganizationServiceTest.java index 2d664ccffe..08359816e4 100644 --- a/app/server/appsmith-server/src/test/java/com/appsmith/server/services/OrganizationServiceTest.java +++ b/app/server/appsmith-server/src/test/java/com/appsmith/server/services/OrganizationServiceTest.java @@ -148,6 +148,7 @@ public class OrganizationServiceTest { assertThat(organization1.getPolicies()).isNotEmpty(); assertThat(organization1.getPolicies()).containsAll(Set.of(manageOrgAppPolicy, manageOrgPolicy)); assertThat(organization1.getSlug() != null); + assertThat(organization1.getEmail()).isEqualTo("api_user"); }) .verifyComplete(); }