ability to disable auto subscribe per participant
This commit is contained in:
@@ -4,10 +4,9 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/routing"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestIsAvailable(t *testing.T) {
|
||||
@@ -17,7 +16,7 @@ func TestIsAvailable(t *testing.T) {
|
||||
UpdatedAt: time.Now().Unix() - 3,
|
||||
},
|
||||
}
|
||||
assert.True(t, routing.IsAvailable(n))
|
||||
require.True(t, routing.IsAvailable(n))
|
||||
})
|
||||
|
||||
t.Run("expired", func(t *testing.T) {
|
||||
@@ -26,6 +25,6 @@ func TestIsAvailable(t *testing.T) {
|
||||
UpdatedAt: time.Now().Unix() - 20,
|
||||
},
|
||||
}
|
||||
assert.False(t, routing.IsAvailable(n))
|
||||
require.False(t, routing.IsAvailable(n))
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user