mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-21 22:04:31 -04:00
ef4da4ac9f
* We now have the ability to import local tracks into Lidarr. Switching to IDv3 tag reading over custom parsing for local tracks. * Stable code for track refresh. * RefreshArtist and RescanArtist events are working correctly. Need to add potential rejection decisions in future. * Implemented code comments * PR comments and fixing some odd db bugs. * Fix some conflicts after Unit Test PR Merge Fix some conflicts after Unit Test PR Merge * Track/Album Add and Update Fixes Track/Album Add and Update Fixes * Fixed an issue with trackimport looking up trackId instead of artistId * Add Handle to TrackService for TrackAddedEvent Add Handle to TrackService for TrackAddedEvent * Update Quality Regex, Store BitRateMode in TrackFile Update Quality Regex, Store BitRateMode in TrackFile
34 lines
928 B
C#
34 lines
928 B
C#
using FizzWare.NBuilder;
|
|
using FluentAssertions;
|
|
using NUnit.Framework;
|
|
using NzbDrone.Core.MediaFiles;
|
|
using NzbDrone.Core.Qualities;
|
|
using NzbDrone.Core.Test.Framework;
|
|
|
|
namespace NzbDrone.Core.Test.MediaFiles
|
|
{
|
|
[TestFixture]
|
|
public class MediaFileRepositoryFixture : DbTest<MediaFileRepository, TrackFile>
|
|
{
|
|
[Test]
|
|
public void get_files_by_series()
|
|
{
|
|
var files = Builder<TrackFile>.CreateListOfSize(10)
|
|
.All()
|
|
.With(c => c.Id = 0)
|
|
.With(c => c.Quality =new QualityModel(Quality.MP3_192))
|
|
.Random(4)
|
|
.With(s => s.ArtistId = 12)
|
|
.BuildListOfNew();
|
|
|
|
|
|
Db.InsertMany(files);
|
|
|
|
var seriesFiles = Subject.GetFilesByArtist(12);
|
|
|
|
seriesFiles.Should().HaveCount(4);
|
|
seriesFiles.Should().OnlyContain(c => c.ArtistId == 12);
|
|
|
|
}
|
|
}
|
|
} |