boltstore/reaper/options_test.go

22 lines
681 B
Go
Raw Normal View History

2014-06-17 12:53:24 +04:00
package reaper
2014-06-17 20:46:12 +04:00
import (
"testing"
"github.com/yosssi/boltstore/shared"
)
func TestOptions_setDefault(t *testing.T) {
options := Options{}
options.setDefault()
if string(options.BucketName) != shared.DefaultBucketName {
t.Errorf("options.BucketName should be %+v (actual: %+v)", []byte(shared.DefaultBucketName), options.BucketName)
}
if options.BatchSize != shared.DefaultBatchSize {
t.Errorf("options.BucketName should be %+d (actual: %+d)", shared.DefaultBatchSize, options.BatchSize)
}
if options.CheckInterval != shared.DefaultCheckInterval {
t.Errorf("options.BucketName should be %+v (actual: %+v)", shared.DefaultCheckInterval, options.CheckInterval)
}
}