1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-22 22:15:17 -04:00

Fixed: Saving IndexerSettings into DB which confuses the datamapper.

Fixes #2945
This commit is contained in:
Leonardo Galli
2018-08-06 19:35:26 +02:00
parent c4ca2f12bb
commit b553d8aef6
9 changed files with 94 additions and 33 deletions
@@ -3,7 +3,9 @@ using System.Collections.Generic;
using System.Linq;
using FluentAssertions;
using NUnit.Framework;
using NzbDrone.Core.Indexers;
using NzbDrone.Core.Indexers.Rarbg;
using NzbDrone.Core.Indexers.TorrentRss;
using NzbDrone.Core.Parser;
using NzbDrone.Core.Parser.Augmenters;
using NzbDrone.Core.Parser.Model;
@@ -13,15 +15,31 @@ namespace NzbDrone.Core.Test.ParserTests.ParsingServiceTests.AugmentersTests
[TestFixture]
public class AugmentWithReleaseInfoFixture : AugmentMovieInfoFixture<AugmentWithReleaseInfo>
{
private IndexerDefinition _indexerDefinition;
[SetUp]
public void Setup()
{
}
private ReleaseInfo ReleaseInfoWithLanguages(params Language[] languages)
{
_indexerDefinition = new IndexerDefinition
{
Settings = new RarbgSettings { MultiLanguages = languages.ToList().Select(l => (int) l) }
};
Mocker.GetMock<IIndexerFactory>()
.Setup(v => v.Get(1))
.Returns(_indexerDefinition);
return new ReleaseInfo
{
IndexerSettings = new RarbgSettings
{
MultiLanguages = languages.ToList().Select(l => (int) l)
}
IndexerId = 1
};
}
[Test]