github.com/holochain/holochain-proto@v0.1.0-alpha-26.0.20200915073418-5c83169c9b5b/change_test.go (about) 1 package holochain 2 3 import ( 4 . "github.com/smartystreets/goconvey/convey" 5 "testing" 6 ) 7 8 // needed to setup the holochain environment, not really a test. 9 func TestChange(t *testing.T) { 10 Convey("it should be able to log deprecation messages", t, func() { 11 c := Change{Type: Deprecation, Message: "deprecated as of %d", AsOf: 2} 12 ShouldLog(&infoLog, func() { 13 c.Log() 14 }, "Deprecation warning: deprecated as of 2\n") 15 16 }) 17 18 Convey("it should be able to log requirement messages", t, func() { 19 c := Change{Type: Warning, Message: "required as of %d", AsOf: 2} 20 ShouldLog(&infoLog, func() { 21 c.Log() 22 }, "Warning: required as of 2\n") 23 }) 24 }