Total Lines | 16 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | package timeago |
||
2 | |||
3 | import ( |
||
4 | "testing" |
||
5 | ) |
||
6 | |||
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 |