Skip to content
This repository was archived by the owner on Dec 19, 2018. It is now read-only.

Commit

Permalink
Add NoBuild test that includes content.
Browse files Browse the repository at this point in the history
- Also fixed wording of existing nobuild test.
  • Loading branch information
NTaylorMullen committed Jun 28, 2018
1 parent 80483f0 commit d25a268
Showing 1 changed file with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,28 @@ public PackIntegrationTest(BuildServerTestFixture buildServer)

[Fact]
[InitializeTestProject("ClassLibrary")]
public async Task Pack__NoBuild_Works_IncludesRazorAssembly()
public async Task Pack_NoBuild_IncludeRazorContent_IncludesRazorViewContent()
{
var result = await DotnetMSBuild("Build");
Assert.BuildPassed(result);

result = await DotnetMSBuild("Pack", "/p:NoBuild=true /p:IncludeRazorContentInPack=true");
Assert.BuildPassed(result);

Assert.NuspecContains(
result,
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"),
@"<files include=""any/netstandard2.0/Views/Shared/_Layout.cshtml"" buildAction=""Content"" />");

Assert.NupkgContains(
result,
Path.Combine("bin", Configuration, "ClassLibrary.1.0.0.nupkg"),
Path.Combine("contentFiles", "any", "netstandard2.0", "Views", "Shared", "_Layout.cshtml"));
}

[Fact]
[InitializeTestProject("ClassLibrary")]
public async Task Pack_NoBuild_Works_IncludesRazorAssembly()
{
var result = await DotnetMSBuild("Build");
Assert.BuildPassed(result);
Expand Down

0 comments on commit d25a268

Please sign in to comment.