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.
recyclarr/tests/Recyclarr.Tests/VersionControl/GitPathTest.cs

40 lines
873 B

using Recyclarr.Repo;
using Recyclarr.Settings;
namespace Recyclarr.Tests.VersionControl;
[TestFixture]
public class GitPathTest
{
[Test, AutoMockData]
public void Default_path_used_when_setting_is_null(
[Frozen] ISettingsProvider settings,
GitPath sut)
{
settings.Settings.Returns(new SettingsValues
{
GitPath = null
});
var result = sut.Path;
result.Should().Be(GitPath.Default);
}
[Test, AutoMockData]
public void User_specified_path_used_instead_of_default(
[Frozen] ISettingsProvider settings,
GitPath sut)
{
var expectedPath = "/usr/local/bin/git";
settings.Settings.Returns(new SettingsValues
{
GitPath = expectedPath
});
var result = sut.Path;
result.Should().Be(expectedPath);
}
}