Refactor file type functions
This commit is contained in:
@@ -1,27 +1,11 @@
|
||||
package model_test
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
|
||||
"github.com/navidrome/navidrome/model"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
var _ = Describe("IsValidPlaylist()", func() {
|
||||
It("returns true for a M3U file", func() {
|
||||
Expect(model.IsValidPlaylist(filepath.Join("path", "to", "test.m3u"))).To(BeTrue())
|
||||
})
|
||||
|
||||
It("returns true for a M3U8 file", func() {
|
||||
Expect(model.IsValidPlaylist(filepath.Join("path", "to", "test.m3u8"))).To(BeTrue())
|
||||
})
|
||||
|
||||
It("returns false for a non-playlist file", func() {
|
||||
Expect(model.IsValidPlaylist("testm3u")).To(BeFalse())
|
||||
})
|
||||
})
|
||||
|
||||
var _ = Describe("Playlist", func() {
|
||||
Describe("ToM3U8()", func() {
|
||||
var pls model.Playlist
|
||||
|
||||
Reference in New Issue
Block a user