diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-08-05 12:43:39 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-08-05 20:42:08 -0300 |
commit | 4362324b40da9daa54c9c6c3a821b0cccaec71a0 (patch) | |
tree | cc93f7222002d39b580fab3c1b01ca6e2ba39a22 /test/unit/data/things/track.js | |
parent | 0dc4db58b90f46cc938b72d571d690e197c6c243 (diff) |
data, test: TrackSection.tracks: use direct links
Diffstat (limited to 'test/unit/data/things/track.js')
-rw-r--r-- | test/unit/data/things/track.js | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/test/unit/data/things/track.js b/test/unit/data/things/track.js index e27fb449..3fe4b4de 100644 --- a/test/unit/data/things/track.js +++ b/test/unit/data/things/track.js @@ -27,9 +27,8 @@ function stubAlbum(tracks, directory = 'bar') { function stubTrackSection(album, tracks, directory = 'baz') { const trackSection = new TrackSection(); trackSection.unqualifiedDirectory = directory; - trackSection.tracks = tracks.map(t => Thing.getReference(t)); - trackSection.ownTrackData = tracks; - trackSection.ownAlbumData = [album]; + trackSection.tracks = tracks; + trackSection.albumData = [album]; return trackSection; } @@ -101,12 +100,10 @@ t.test(`Track.album`, t => { track1.albumData = [album1, album2]; track2.albumData = [album1, album2]; - section1.ownTrackData = [track1]; - section2.ownTrackData = [track2]; - section1.ownAlbumData = [album1]; - section2.ownAlbumData = [album2]; - section1.tracks = ['track:track1']; - section2.tracks = ['track:track2']; + section1.tracks = [track1]; + section2.tracks = [track2]; + section1.albumData = [album1]; + section2.albumData = [album2]; album1.trackSections = [section1]; album2.trackSections = [section2]; @@ -123,7 +120,7 @@ t.test(`Track.album`, t => { t.equal(track1.album, null, `album #4: is null when track missing albumData`); - section1.ownTrackData = []; + section1.tracks = []; // XXX_decacheWikiData album1.trackSections = []; @@ -132,10 +129,9 @@ t.test(`Track.album`, t => { track1.albumData = [album2, album1]; t.equal(track1.album, null, - `album #5: is null when album track section missing ownTrackData`); + `album #5: is null when album track section missing tracks`); - section1.ownTrackData = [track2]; - section1.tracks = ['track:track2']; + section1.tracks = [track2]; // XXX_decacheWikiData album1.trackSections = []; |