mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-01 07:57:56 +01:00
test(server): make the handleM3U spec independent of spec order (#6221)
It relied on another spec having set auth.PublicTokenAuth, so it panicked whenever Ginkgo ran it first.
This commit is contained in:
parent
a0c4160376
commit
3f89baaec8
1 changed files with 3 additions and 0 deletions
|
|
@ -4,7 +4,9 @@ import (
|
|||
"net/http"
|
||||
"net/http/httptest"
|
||||
|
||||
"github.com/go-chi/jwtauth/v5"
|
||||
"github.com/navidrome/navidrome/core"
|
||||
"github.com/navidrome/navidrome/core/auth"
|
||||
"github.com/navidrome/navidrome/model"
|
||||
"github.com/navidrome/navidrome/tests"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
|
|
@ -17,6 +19,7 @@ var _ = Describe("handleM3U", func() {
|
|||
var pub *Router
|
||||
|
||||
BeforeEach(func() {
|
||||
auth.PublicTokenAuth = jwtauth.New("HS256", []byte("test-secret"), nil)
|
||||
ds = &tests.MockDataStore{}
|
||||
shareRepo = &tests.MockShareRepo{}
|
||||
ds.MockedShare = shareRepo
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue