quintodrome/api/get_license_test.go

24 lines
537 B
Go
Raw Normal View History

2016-02-27 14:42:08 -09:00
package api_test
import (
. "github.com/deluan/gosonic/tests"
2016-02-24 14:24:06 -09:00
. "github.com/smartystreets/goconvey/convey"
2016-02-25 14:52:07 -09:00
"testing"
)
func TestGetLicense(t *testing.T) {
Init(t, false)
2016-02-27 14:42:08 -09:00
2016-02-24 14:24:06 -09:00
_, w := Get(AddParams("/rest/getLicense.view"), "TestGetLicense")
Convey("Subject: GetLicense Endpoint", t, func() {
Convey("Status code should be 200", func() {
So(w.Code, ShouldEqual, 200)
})
Convey("The license should always be valid", func() {
So(UnindentJSON(w.Body.Bytes()), ShouldContainSubstring, `"license":{"valid":true}`)
})
})
}