As far as I can tell you wouldn't expect this to pass. Setting the path is handled by AddArtistService, not ArtistService. This file is present in the Sonarr tree but not included in the project.pull/861/head
parent
abe4c803b9
commit
2c0d272c54
@ -1,40 +0,0 @@
|
|||||||
using FizzWare.NBuilder;
|
|
||||||
using FluentAssertions;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using NzbDrone.Core.Organizer;
|
|
||||||
using NzbDrone.Core.Music;
|
|
||||||
using NzbDrone.Core.Test.Framework;
|
|
||||||
using NzbDrone.Core.Music.Events;
|
|
||||||
|
|
||||||
namespace NzbDrone.Core.Test.MusicTests.ArtistServiceTests
|
|
||||||
{
|
|
||||||
[TestFixture]
|
|
||||||
public class AddArtistFixture : CoreTest<ArtistService>
|
|
||||||
{
|
|
||||||
private Artist _fakeArtist;
|
|
||||||
|
|
||||||
[SetUp]
|
|
||||||
public void Setup()
|
|
||||||
{
|
|
||||||
_fakeArtist = Builder<Artist>.CreateNew().Build();
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void artist_added_event_should_have_proper_path()
|
|
||||||
{
|
|
||||||
_fakeArtist.Path = null;
|
|
||||||
_fakeArtist.RootFolderPath = @"C:\Test\Music";
|
|
||||||
|
|
||||||
Mocker.GetMock<IBuildFileNames>()
|
|
||||||
.Setup(s => s.GetArtistFolder(_fakeArtist, null))
|
|
||||||
.Returns(_fakeArtist.Name);
|
|
||||||
|
|
||||||
var artist = Subject.AddArtist(_fakeArtist);
|
|
||||||
|
|
||||||
artist.Path.Should().NotBeNull();
|
|
||||||
|
|
||||||
VerifyEventPublished<ArtistAddedEvent>();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in new issue