| Index: service/rawdatastore/datastore_test.go
|
| diff --git a/service/rawdatastore/datastore_test.go b/service/rawdatastore/datastore_test.go
|
| index 462fe7cfac382ea5e6c20ac429050da0031821b7..ae4d9abe08d665d74ea47de81fd82e73909c3e72 100644
|
| --- a/service/rawdatastore/datastore_test.go
|
| +++ b/service/rawdatastore/datastore_test.go
|
| @@ -1641,10 +1641,12 @@ func TestSpecial(t *testing.T) {
|
|
|
| Convey("convertible meta default types", func() {
|
| type OKDefaults struct {
|
| - When string `gae:"$when,tomorrow"`
|
| - Amount int64 `gae:"$amt,100"`
|
| + When string `gae:"$when,tomorrow"`
|
| + Amount int64 `gae:"$amt,100"`
|
| + DoIt BoolFlag `gae:"$doit,true"`
|
| }
|
| - pls := GetPLS(&OKDefaults{})
|
| + okd := &OKDefaults{}
|
| + pls := GetPLS(okd)
|
| So(pls.Problem(), ShouldBeNil)
|
|
|
| v, err := pls.GetMeta("when")
|
| @@ -1654,6 +1656,25 @@ func TestSpecial(t *testing.T) {
|
| v, err = pls.GetMeta("amt")
|
| So(err, ShouldBeNil)
|
| So(v, ShouldEqual, int64(100))
|
| +
|
| + So(okd.DoIt, ShouldEqual, Auto)
|
| + v, err = pls.GetMeta("doit")
|
| + So(err, ShouldBeNil)
|
| + So(v, ShouldBeTrue)
|
| +
|
| + err = pls.SetMeta("doit", false)
|
| + So(err, ShouldBeNil)
|
| + v, err = pls.GetMeta("doit")
|
| + So(err, ShouldBeNil)
|
| + So(v, ShouldBeFalse)
|
| + So(okd.DoIt, ShouldEqual, False)
|
| +
|
| + err = pls.SetMeta("doit", true)
|
| + So(err, ShouldBeNil)
|
| + v, err = pls.GetMeta("doit")
|
| + So(err, ShouldBeNil)
|
| + So(v, ShouldBeTrue)
|
| + So(okd.DoIt, ShouldEqual, True)
|
| })
|
|
|
| Convey("meta fields can be saved", func() {
|
|
|