Skip to content

Commit ff832c9

Browse files
committed
test: Unify unit test format
1 parent a33690a commit ff832c9

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

constellation_unit_test.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ func (s *ConstellationSuite) TestCarbon_Constellation() {
3333
s.Empty(Parse("xxx").Constellation())
3434
})
3535

36+
s.Run("error resources", func() {
37+
lang := NewLanguage()
38+
lang.SetResources(map[string]string{
39+
"xxx": "xxx",
40+
})
41+
s.Error(lang.Error)
42+
s.Empty(Parse("2020-08-05").SetLanguage(lang).Constellation())
43+
})
44+
3645
s.Run("valid carbon", func() {
3746
s.Equal(Capricorn, Parse("2020-01-05").Constellation())
3847
s.Equal(Aquarius, Parse("2020-02-05").Constellation())
@@ -74,10 +83,9 @@ func (s *ConstellationSuite) TestCarbon_Constellation() {
7483
s.Run("error resources", func() {
7584
lang := NewLanguage()
7685
resources := map[string]string{
77-
"xxx": "xxx",
86+
"constellations": "xxx",
7887
}
7988
lang.SetResources(resources)
80-
s.Error(lang.Error)
8189
c := Parse("2020-01-05").SetLanguage(lang)
8290
s.Empty(c.Constellation())
8391
})

0 commit comments

Comments
 (0)