Skip to content

Commit

Permalink
(#508) Enable tests with relative path sources
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCakeIsNaOH committed Dec 22, 2022
1 parent ea863fe commit 48380e8
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/chocolatey.tests.integration/scenarios/InfoScenarios.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ public override void Because()
}
}

[Broken, Pending("Need to be fixed in either NuGet.Client or before calling code in NuGet.Client")]
public class when_searching_for_exact_package_through_command : CommandScenariosBase
{
public override void Context()
Expand All @@ -94,7 +93,7 @@ public void should_log_package_information()
.ToShortDateString();

MockLogger.Messages.Keys.ShouldContain(LogLevel.Info.to_string());
MockLogger.Messages[LogLevel.Info.to_string()].ShouldContain(" Title: installpackage | Published: 14.12.2022\r\n Number of Downloads: n/a | Downloads for this version: n/a\r\n Package url\r\n Chocolatey Package Source: n/a\r\n Tags: installpackage admin\r\n Software Site: n/a\r\n Software License: n/a\r\n Summary: __REPLACE__\r\n Description: __REPLACE__\r\n".format_with(lastWriteDate));
MockLogger.Messages[LogLevel.Info.to_string()].ShouldContain(" Title: installpackage | Published: {0}\r\n Number of Downloads: n/a | Downloads for this version: n/a\r\n Package url\r\n Chocolatey Package Source: n/a\r\n Tags: installpackage admin\r\n Software Site: n/a\r\n Software License: n/a\r\n Summary: __REPLACE__\r\n Description: __REPLACE__\r\n".format_with(lastWriteDate));
}

[Fact]
Expand All @@ -105,7 +104,6 @@ public void should_log_package_count_as_warning()
}
}

[Broken, Pending("Need to be fixed in either NuGet.Client or before calling code in NuGet.Client")]
public class when_searching_for_exact_package_with_dot_relative_path_source : when_searching_for_exact_package_through_command
{
public override void Context()
Expand Down Expand Up @@ -143,7 +141,7 @@ public override void Because()
.ToShortDateString();

MockLogger.Messages.Keys.ShouldContain(LogLevel.Info.to_string());
MockLogger.Messages[LogLevel.Info.to_string()].ShouldContain(" Title: installpackage | Published: 14.12.2022\r\n Number of Downloads: n/a | Downloads for this version: n/a\r\n Package url\r\n Chocolatey Package Source: n/a\r\n Tags: installpackage admin\r\n Software Site: n/a\r\n Software License: n/a\r\n Summary: __REPLACE__\r\n Description: __REPLACE__\r\n".format_with(lastWriteDate));
MockLogger.Messages[LogLevel.Info.to_string()].ShouldContain(" Title: installpackage | Published: {0}\r\n Number of Downloads: n/a | Downloads for this version: n/a\r\n Package url\r\n Chocolatey Package Source: n/a\r\n Tags: installpackage admin\r\n Software Site: n/a\r\n Software License: n/a\r\n Summary: __REPLACE__\r\n Description: __REPLACE__\r\n".format_with(lastWriteDate));
}

[Fact]
Expand All @@ -154,7 +152,6 @@ public override void Because()
}
}

[Broken, Pending("Need to be fixed in either NuGet.Client or before calling code in NuGet.Client")]
public class when_searching_for_exact_package_with_verbose_output : ScenariosBase
{
public override void Context()
Expand Down Expand Up @@ -193,7 +190,9 @@ public void should_report_expected_name()
[Fact]
public void should_set_source_to_expected_value()
{
Results[0].Source.ShouldEqual("PackageOutput");
Results[0].Source.ShouldEqual(
("file:///" + Path.Combine(Environment.CurrentDirectory, "PackageOutput"))
.Replace("\\","/"));
}

[Fact]
Expand Down

0 comments on commit 48380e8

Please sign in to comment.