diff --git a/pkg/schema/localizer/localizer_test.go b/pkg/schema/localizer/localizer_test.go index fffda4b78c98f5f7a4ee6e10fcb3007297598123..ab6b277cdcad36a1ffdd217f1ec198a2bf958f9f 100644 --- a/pkg/schema/localizer/localizer_test.go +++ b/pkg/schema/localizer/localizer_test.go @@ -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) {