Passed
Push — master ( b486cf...8123a4 )
by Serhii
02:01 queued 28s
created

timeago.TestParseJsonIntoLang   A

Complexity

Conditions 3

Size

Total Lines 6
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 5
dl 0
loc 6
rs 10
c 0
b 0
f 0
nop 1
1
package timeago
2
3
import (
4
	"testing"
5
)
6
7
func TestParseJsonIntoLang(t *testing.T) {
8
	t.Run("Function returns Lang model with needed values", func(test *testing.T) {
9
		result := parseJsonIntoLang("langs/ru.json")
10
11
		if result.Ago != "назад" {
12
			t.Errorf("Function needs to return model with value назад, but returned %v", result.Ago)
13
		}
14
	})
15
}
16