Skip to content

Commit e476329

Browse files
committed
add test
1 parent b642fe0 commit e476329

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

options_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ func TestWithMeta(t *testing.T) {
4343
require.Equal(t, "value", opts.Tags["test"])
4444
}
4545

46+
func TestWithVersion(t *testing.T) {
47+
opt := WithVersion(2, "xxx")
48+
opts := &PublishOptions{}
49+
opt(opts)
50+
require.Equal(t, 2, opts.Version)
51+
require.Equal(t, "xxx", opts.VersionEpoch)
52+
}
53+
4654
func TestSubscribeOptions(t *testing.T) {
4755
subscribeOpts := []SubscribeOption{
4856
WithExpireAt(1),

0 commit comments

Comments
 (0)