Merge pull request #28 from buglloc/bucket_tests

Fixed bucket tests
This commit is contained in:
Karl Seguin 2019-02-23 22:26:40 +07:00 committed by GitHub
commit ec06cd93a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,7 +9,7 @@ import (
type BucketTests struct {
}
func Tests_Bucket(t *testing.T) {
func Test_Bucket(t *testing.T) {
Expectify(new(BucketTests), t)
}
@ -42,10 +42,10 @@ func (_ *BucketTests) SetsANewBucketItem() {
func (_ *BucketTests) SetsAnExistingItem() {
bucket := testBucket()
item, existing := bucket.set("power", TestValue("9001"), time.Minute)
assertValue(item, "9002")
assertValue(item, "9001")
item = bucket.get("power")
assertValue(item, "9002")
assertValue(existing, "9001")
assertValue(item, "9001")
assertValue(existing, "9000")
}
func testBucket() *bucket {