Skip to content

Commit 24f9ebf

Browse files
committed
Test: Move Value Time Splits to Item
1 parent e9bc280 commit 24f9ebf

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

types_test.go

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -109,30 +109,6 @@ func TestMarshal(t *testing.T) {
109109
Split: 10,
110110
},
111111
},
112-
ValueTimeSplits: []types.PodcastValueTimeSplit{
113-
{
114-
StartTime: types.DurationInteger(60 * time.Second),
115-
Duration: types.DurationInteger(237 * time.Second),
116-
RemoteItem: types.PodcastRemoteItem{
117-
ItemGUID: pointer("https://podcastindex.org/podcast/4148683#1"),
118-
FeedGUID: uuid.MustParse("a94f5cc9-8c58-55fc-91fe-a324087a655b"),
119-
FeedURL: pointer("https://feeds.podcastindex.org/Album-TourconVII.xml"),
120-
Medium: pointer(types.PodcastMediumMusic),
121-
},
122-
RemotePercentage: pointer[uint](95),
123-
},
124-
{
125-
StartTime: types.DurationInteger(330 * time.Second),
126-
Duration: types.DurationInteger(53 * time.Second),
127-
RemoteItem: types.PodcastRemoteItem{
128-
ItemGUID: pointer("https://podcastindex.org/podcast/4148683#3"),
129-
FeedGUID: uuid.MustParse("a94f5cc9-8c58-55fc-91fe-a324087a655b"),
130-
Medium: pointer(types.PodcastMediumMusic),
131-
},
132-
RemoteStartTime: pointer(types.DurationInteger(174 * time.Second)),
133-
RemotePercentage: pointer[uint](95),
134-
},
135-
},
136112
},
137113
PodcastGUID: pointer(types.PodcastGUID("cda647ce-56b8-5d7c-9448-ba1993ab46b7")),
138114
PodcastMedium: &types.PodcastMediumPodcast,
@@ -301,6 +277,30 @@ func TestMarshal(t *testing.T) {
301277
Split: 10,
302278
},
303279
},
280+
ValueTimeSplits: []types.PodcastValueTimeSplit{
281+
{
282+
StartTime: types.DurationInteger(60 * time.Second),
283+
Duration: types.DurationInteger(237 * time.Second),
284+
RemoteItem: types.PodcastRemoteItem{
285+
ItemGUID: pointer("https://podcastindex.org/podcast/4148683#1"),
286+
FeedGUID: uuid.MustParse("a94f5cc9-8c58-55fc-91fe-a324087a655b"),
287+
FeedURL: pointer("https://feeds.podcastindex.org/Album-TourconVII.xml"),
288+
Medium: pointer(types.PodcastMediumMusic),
289+
},
290+
RemotePercentage: pointer[uint](95),
291+
},
292+
{
293+
StartTime: types.DurationInteger(330 * time.Second),
294+
Duration: types.DurationInteger(53 * time.Second),
295+
RemoteItem: types.PodcastRemoteItem{
296+
ItemGUID: pointer("https://podcastindex.org/podcast/4148683#3"),
297+
FeedGUID: uuid.MustParse("a94f5cc9-8c58-55fc-91fe-a324087a655b"),
298+
Medium: pointer(types.PodcastMediumMusic),
299+
},
300+
RemoteStartTime: pointer(types.DurationInteger(174 * time.Second)),
301+
RemotePercentage: pointer[uint](95),
302+
},
303+
},
304304
},
305305
PodcastSoundbites: []types.PodcastSoundbite{
306306
{
@@ -465,12 +465,6 @@ func TestMarshal(t *testing.T) {
465465
<podcast:valueRecipient name="Co-Host #1" type="node" address="02d5c1bf8b940dc9cadca86d1b0a3c37fbe39cee4c7e839e33bef9174531d27f52" split="50"></podcast:valueRecipient>
466466
<podcast:valueRecipient name="Co-Host #2" type="node" address="032f4ffbbafffbe51726ad3c164a3d0d37ec27bc67b29a159b0f49ae8ac21b8508" split="40"></podcast:valueRecipient>
467467
<podcast:valueRecipient name="Producer" type="node" address="03ae9f91a0cb8ff43840e3c322c4c61f019d8c1c3cea15a25cfc425ac605e61a4a" split="10"></podcast:valueRecipient>
468-
<podcast:valueTimeSplit startTime="60" duration="237" remotePercentage="95">
469-
<podcast:remoteItem itemGuid="https://podcastindex.org/podcast/4148683#1" feedGuid="a94f5cc9-8c58-55fc-91fe-a324087a655b" feedUrl="https://feeds.podcastindex.org/Album-TourconVII.xml" medium="music"></podcast:remoteItem>
470-
</podcast:valueTimeSplit>
471-
<podcast:valueTimeSplit startTime="330" duration="53" remoteStartTime="174" remotePercentage="95">
472-
<podcast:remoteItem itemGuid="https://podcastindex.org/podcast/4148683#3" feedGuid="a94f5cc9-8c58-55fc-91fe-a324087a655b" medium="music"></podcast:remoteItem>
473-
</podcast:valueTimeSplit>
474468
</podcast:value>
475469
<podcast:liveItem status="live" start="2021-09-10T02:07:30Z" end="2021-09-10T02:09:30Z">
476470
<enclosure url="https://example.com/pc20/livestream?format=.mp3" length="312" type="audio/mpeg"></enclosure>
@@ -516,6 +510,12 @@ func TestMarshal(t *testing.T) {
516510
<podcast:value type="lightning" method="keysend">
517511
<podcast:valueRecipient name="Host" type="node" address="02d5c1bf8b940dc9cadca86d1b0a3c37fbe39cee4c7e839e33bef9174531d27f52" split="90"></podcast:valueRecipient>
518512
<podcast:valueRecipient name="Producer" type="node" address="03ae9f91a0cb8ff43840e3c322c4c61f019d8c1c3cea15a25cfc425ac605e61a4a" split="10"></podcast:valueRecipient>
513+
<podcast:valueTimeSplit startTime="60" duration="237" remotePercentage="95">
514+
<podcast:remoteItem itemGuid="https://podcastindex.org/podcast/4148683#1" feedGuid="a94f5cc9-8c58-55fc-91fe-a324087a655b" feedUrl="https://feeds.podcastindex.org/Album-TourconVII.xml" medium="music"></podcast:remoteItem>
515+
</podcast:valueTimeSplit>
516+
<podcast:valueTimeSplit startTime="330" duration="53" remoteStartTime="174" remotePercentage="95">
517+
<podcast:remoteItem itemGuid="https://podcastindex.org/podcast/4148683#3" feedGuid="a94f5cc9-8c58-55fc-91fe-a324087a655b" medium="music"></podcast:remoteItem>
518+
</podcast:valueTimeSplit>
519519
</podcast:value>
520520
<psc:chapters version="1.2">
521521
<psc:chapter start="00:00" title="Introduction"></psc:chapter>

0 commit comments

Comments
 (0)