Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
Fix failing release notes tests
Browse files Browse the repository at this point in the history
  • Loading branch information
caesay committed Aug 22, 2022
1 parent c56e608 commit 1aa6325
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions test/Squirrel.Tests/ReleasePackageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,12 @@ public void SpecFileMarkdownRenderingTest()
BindingFlags.NonPublic | BindingFlags.Instance);
renderMinfo.Invoke(fixture, new object[] { targetFile, processor });

var doc = XDocument.Load(targetFile);
XNamespace ns = "http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd";
var relNotesElement = doc.Descendants(ns + "releaseNotes").First();
var htmlText = relNotesElement.Value;

this.Log().Info("HTML Text:\n{0}", htmlText);

htmlText.Contains("## Release Notes").ShouldBeFalse();
var mani = NuspecManifest.ParseFromFile(targetFile);
this.Log().Info("HTML Text:\n{0}", mani.ReleaseNotesHtml);

mani.ReleaseNotes.Contains("## Release Notes").ShouldBeTrue();
mani.ReleaseNotesHtml.Contains("## Release Notes").ShouldBeFalse();
mani.ReleaseNotesHtml.Contains("<h2>Release Notes").ShouldBeTrue();
} finally {
File.Delete(targetFile);
}
Expand Down

0 comments on commit 1aa6325

Please sign in to comment.