Skip to content

Commit c7153d9

Browse files
author
Hidayat Hamir
committed
feat: source telemarketing to store code eraspace
1 parent d38d2ef commit c7153d9

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

helper.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,5 +280,8 @@ func SourceToStoreCodeCCM(source string) (storeCode string) {
280280
if source == constants.XSource_Enterprise {
281281
return "en"
282282
}
283+
if source == constants.XSource_Telemarketing {
284+
return constants.XSource_Eraspace
285+
}
283286
return source
284287
}

helper_test.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,14 @@ func TestSourceToStoreCodeCCM(t *testing.T) {
657657
wantStoreCode: "en",
658658
},
659659
{
660-
name: "source except enterprise should return itself",
660+
name: "source telemarketing should return eraspace",
661+
args: args{
662+
source: constants.XSource_Telemarketing,
663+
},
664+
wantStoreCode: constants.XSource_Eraspace,
665+
},
666+
{
667+
name: "other source should return itself",
661668
args: args{
662669
source: constants.XSource_Eraspace,
663670
},

0 commit comments

Comments
 (0)