Fixed: Backend Updates from Sonarr

Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
Co-Authored-By: taloth <taloth@users.noreply.github.com>
This commit is contained in:
Qstick
2019-06-30 21:50:01 -04:00
parent d178dce0d3
commit 91ab518dfb
131 changed files with 2422 additions and 988 deletions

View File

@@ -6,6 +6,8 @@ using NzbDrone.Core.MediaFiles;
using NzbDrone.Core.Qualities;
using NzbDrone.Core.Test.Framework;
using NzbDrone.Core.Movies;
using System.Collections.Generic;
using NzbDrone.Core.Languages;
namespace NzbDrone.Core.Test.Datastore
{
@@ -64,10 +66,12 @@ namespace NzbDrone.Core.Test.Datastore
public void embedded_document_as_json()
{
var quality = new QualityModel { Quality = Quality.Bluray720p, Revision = new Revision(version: 2 )};
var languages = new List<Language> { Language.English };
var history = Builder<History.History>.CreateNew()
.With(c => c.Id = 0)
.With(c => c.Quality = quality)
.With(c => c.Languages = languages)
.Build();
Db.Insert(history);
@@ -79,14 +83,18 @@ namespace NzbDrone.Core.Test.Datastore
[Test]
public void embedded_list_of_document_with_json()
{
var languages = new List<Language> { Language.English };
var history = Builder<History.History>.CreateListOfSize(2)
.All().With(c => c.Id = 0)
.With(c => c.Languages = languages)
.Build().ToList();
history[0].Quality = new QualityModel { Quality = Quality.HDTV1080p, Revision = new Revision(version: 2)};
history[1].Quality = new QualityModel { Quality = Quality.Bluray720p, Revision = new Revision(version: 2)};
Db.InsertMany(history);
var returnedHistory = Db.All<History.History>();