Conditions | 4 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | package timeago |
||
7 | func Test_parseJsonIntoLang(t *testing.T) { |
||
8 | t.Run("Function returns Lang model with needed values", func(test *testing.T) { |
||
9 | res, err := parseLangSet("langs/ru.json") |
||
10 | |||
11 | if err != nil { |
||
12 | t.Errorf("Function parseLangSet must return Lang model, but returned error %v", err) |
||
13 | } |
||
14 | |||
15 | if res.Ago != "назад" { |
||
16 | t.Errorf("Function needs to return model with value назад, but returned %v", res.Ago) |
||
17 | } |
||
20 |