Skip to content

Commit

Permalink
Merge pull request #10 from Hidayathamir/feature/source-to-store-code
Browse files Browse the repository at this point in the history
feat: source telemarketing to store code eraspace
  • Loading branch information
hafizarr authored Mar 6, 2024
2 parents 535289b + c7153d9 commit 48c676b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
9 changes: 8 additions & 1 deletion helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down

0 comments on commit 48c676b

Please sign in to comment.