Method, Variable, Class Renames in Readarr.Api

This commit is contained in:
Qstick
2020-05-15 17:22:44 -04:00
committed by ta264
parent 8080d375d0
commit ee4e44b81a
91 changed files with 945 additions and 948 deletions
@@ -0,0 +1,45 @@
using System.Linq;
using FluentAssertions;
using NUnit.Framework;
using NzbDrone.Test.Common;
using Readarr.Api.V1.Author;
namespace NzbDrone.Integration.Test.ApiTests
{
[TestFixture]
public class AuthorEditorFixture : IntegrationTest
{
private void GivenExistingAuthor()
{
foreach (var name in new[] { "Alien Ant Farm", "Kiss" })
{
var newAuthor = Author.Lookup(name).First();
newAuthor.QualityProfileId = 1;
newAuthor.MetadataProfileId = 1;
newAuthor.Path = string.Format(@"C:\Test\{0}", name).AsOsAgnostic();
Author.Post(newAuthor);
}
}
[Test]
public void should_be_able_to_update_multiple_artist()
{
GivenExistingAuthor();
var author = Author.All();
var artistEditor = new AuthorEditorResource
{
QualityProfileId = 2,
AuthorIds = author.Select(o => o.Id).ToList()
};
var result = Author.Editor(artistEditor);
result.Should().HaveCount(2);
result.TrueForAll(s => s.QualityProfileId == 2).Should().BeTrue();
}
}
}