You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Radarr/src/NzbDrone.Integration.Test/SeriesEditorIntegrationTest.cs

43 lines
1.0 KiB

11 years ago
using System;
using FluentAssertions;
using NUnit.Framework;
using System.Linq;
using NzbDrone.Test.Common;
namespace NzbDrone.Integration.Test
{
[TestFixture]
public class SeriesEditorIntegrationTest : IntegrationTest
{
private void GivenExistingSeries()
{
foreach (var title in new[] { "90210", "Dexter" })
{
var newSeries = Series.Lookup(title).First();
newSeries.ProfileId = 1;
11 years ago
newSeries.Path = String.Format(@"C:\Test\{0}", title).AsOsAgnostic();
Series.Post(newSeries);
}
}
[Test]
public void should_be_able_to_update_multiple_series()
{
GivenExistingSeries();
var series = Series.All();
foreach (var s in series)
{
s.ProfileId = 2;
11 years ago
}
var result = Series.Editor(series);
result.Should().HaveCount(2);
result.TrueForAll(s => s.ProfileId == 2).Should().BeTrue();
11 years ago
}
}
}