Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Apr 20, 2023
1 parent 86a6f5f commit 7970c2d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions hub_test.go
Expand Up @@ -8,6 +8,7 @@ import (
"os/exec"
"sync"
"testing"
"time"

"github.com/golang-jwt/jwt/v4"
"github.com/spf13/viper"
Expand All @@ -25,6 +26,12 @@ func TestNewHub(t *testing.T) {
h := createDummy()

assert.IsType(t, &viper.Viper{}, h.config)

assert.False(t, h.opt.anonymous)
assert.Equal(t, defaultCookieName, h.opt.cookieName)
assert.Equal(t, 40*time.Second, h.opt.heartbeat)
assert.Equal(t, 5*time.Second, h.opt.dispatchTimeout)
assert.Equal(t, 600*time.Second, h.opt.writeTimeout)
}

func TestNewHubWithConfig(t *testing.T) {
Expand Down

0 comments on commit 7970c2d

Please sign in to comment.