mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-26 22:46:37 -04:00
Method, Variable, Class Renames in Readarr.Api
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user