Skip to content
Snippets Groups Projects
Commit 7e3853fc authored by Pavel Antonov's avatar Pavel Antonov :asterisk:
Browse files

Merge branch 'feature/PRXS-2766-LocalizerSchemaMainObjSingleLocale' into 'master'

Добавлены тесты Localizer-a для обьектов без переводов

See merge request perxis/perxis-go!304
parents d33ba61e 2d60b131
No related branches found
No related tags found
No related merge requests found
......@@ -352,6 +352,24 @@ func TestLocalizer_localize(t *testing.T) {
},
},
},
{
name: "Success singlelocale obj",
fallback: map[string]interface{}{
"obj3": map[string]interface{}{
"a": "obj3_en",
},
},
target: map[string]interface{}{
"obj3": map[string]interface{}{
"a": "obj3",
},
},
want: map[string]interface{}{
"obj3": map[string]interface{}{
"a": "obj3_en",
},
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
......@@ -595,6 +613,20 @@ func TestLocalizer_extractTranslation(t *testing.T) {
},
},
},
{
name: "Success singlelocale obj",
fallback: map[string]interface{}{
"obj3": map[string]interface{}{
"a": "obj3_en",
},
},
target: map[string]interface{}{
"obj3": map[string]interface{}{
"a": "obj3_ru",
},
},
want: map[string]interface{}{},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment