mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 02:44:59 +00:00
Better convey usage.
This commit is contained in:
parent
9306290d96
commit
4e3203df16
1 changed files with 4 additions and 4 deletions
|
|
@ -15,15 +15,15 @@ func TestConfig(t *testing.T) {
|
|||
So(Get("port_tcp").(int), ShouldEqual, 12000)
|
||||
So(Get("port_http").(int), ShouldEqual, 15000)
|
||||
So(Get("temp").(string), ShouldEqual, "/tmp")
|
||||
So(Get("notfound"), ShouldEqual, nil)
|
||||
So(Get("notfound"), ShouldBeNil)
|
||||
})
|
||||
Convey("config.GetSafe()", t, func() {
|
||||
val, ok := GetSafe("port_tcp")
|
||||
So(ok, ShouldEqual, true)
|
||||
So(ok, ShouldBeTrue)
|
||||
So(val.(int), ShouldEqual, 12000)
|
||||
val, ok = GetSafe("derp")
|
||||
So(ok, ShouldEqual, false)
|
||||
So(val, ShouldEqual, nil)
|
||||
So(ok, ShouldBeFalse)
|
||||
So(val, ShouldBeNil)
|
||||
})
|
||||
Convey("config.GetInt()", t, func() {
|
||||
So(GetInt("port_tcp"), ShouldEqual, 12000)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue