Archived
2
0
This repository has been archived on 2023-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
kerma/models/tests/error_test.go

25 lines
466 B
Go
Raw Normal View History

2023-03-02 14:28:43 +00:00
package tests
import (
"kerma/models"
"testing"
. "github.com/smartystreets/goconvey/convey"
)
func TestError(t *testing.T) {
Convey("Given a new error", t, func() {
errString := "testing error"
var err models.Error
Convey("When the constructor is called with a value", func() {
err.Construct(errString)
Convey("The value should be set", func() {
So(err.Type, ShouldEqual, "error")
So(err.Error, ShouldEqual, errString)
})
})
})
}