mirror of
https://github.com/mxpv/podsync.git
synced 2024-05-11 05:55:04 +00:00
Fix tests
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/mxpv/podsync/pkg/api"
|
||||
"github.com/mxpv/podsync/pkg/model"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
@@ -35,12 +36,13 @@ func TestBuildYTFeed(t *testing.T) {
|
||||
builder, err := NewYouTubeBuilder(ytKey)
|
||||
require.NoError(t, err)
|
||||
|
||||
podcast, err := builder.Build(&api.Feed{
|
||||
podcast, err := builder.Build(&model.Feed{
|
||||
Provider: api.ProviderYoutube,
|
||||
LinkType: api.LinkTypeChannel,
|
||||
ItemId: "UCupvZG-5ko_eiXAupbDfxWw",
|
||||
ItemID: "UCupvZG-5ko_eiXAupbDfxWw",
|
||||
PageSize: maxYoutubeResults,
|
||||
})
|
||||
|
||||
require.NoError(t, err)
|
||||
|
||||
require.Equal(t, "CNN", podcast.Title)
|
||||
|
||||
@@ -3,7 +3,7 @@ package id
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/mxpv/podsync/pkg/api"
|
||||
"github.com/mxpv/podsync/pkg/model"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
@@ -11,7 +11,7 @@ func TestEncode(t *testing.T) {
|
||||
hid, err := NewIdGenerator()
|
||||
require.NoError(t, err)
|
||||
|
||||
feed := &api.Feed{}
|
||||
feed := &model.Feed{}
|
||||
|
||||
hash, err := hid.Generate(feed)
|
||||
require.NoError(t, err)
|
||||
|
||||
Reference in New Issue
Block a user