From c7153d917de3321aa209a4cb22ca51b8d65c42e2 Mon Sep 17 00:00:00 2001 From: Hidayat Hamir Date: Wed, 6 Mar 2024 13:36:41 +0700 Subject: [PATCH] feat: source telemarketing to store code eraspace --- helper.go | 3 +++ helper_test.go | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/helper.go b/helper.go index 119aae2..b5f404e 100644 --- a/helper.go +++ b/helper.go @@ -280,5 +280,8 @@ func SourceToStoreCodeCCM(source string) (storeCode string) { if source == constants.XSource_Enterprise { return "en" } + if source == constants.XSource_Telemarketing { + return constants.XSource_Eraspace + } return source } diff --git a/helper_test.go b/helper_test.go index 8d2475b..f225ea1 100644 --- a/helper_test.go +++ b/helper_test.go @@ -657,7 +657,14 @@ func TestSourceToStoreCodeCCM(t *testing.T) { wantStoreCode: "en", }, { - name: "source except enterprise should return itself", + name: "source telemarketing should return eraspace", + args: args{ + source: constants.XSource_Telemarketing, + }, + wantStoreCode: constants.XSource_Eraspace, + }, + { + name: "other source should return itself", args: args{ source: constants.XSource_Eraspace, },