mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-28 21:12:43 +02:00
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:
@@ -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>();
|
||||
|
Reference in New Issue
Block a user