Skip to content

Commit

Permalink
Merge pull request #15 from kzu/dev
Browse files Browse the repository at this point in the history
Ensure we have at least a dependency when testing package license
  • Loading branch information
kzu authored Oct 8, 2020
2 parents 90166fd + 5595774 commit b87db80
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/NuGetizer.Tests/CreatePackageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,18 @@ public void when_creating_package_has_development_dependency_metadata_then_manif
[Fact]
public void when_creating_package_has_license_expression_then_manifest_has_license()
{
task.Contents = new[]
{
// Need at least one dependency or content file for the generation to succeed.
new TaskItem("Newtonsoft.Json", new Metadata
{
{ MetadataName.PackageId, task.Manifest.GetMetadata("Id") },
{ MetadataName.PackFolder, PackFolderKind.Dependency },
{ MetadataName.Version, "8.0.0" },
{ MetadataName.TargetFramework, "net45" }
}),
};

task.Manifest.SetMetadata("LicenseUrl", "");
task.Manifest.SetMetadata("LicenseExpression", "MIT");

Expand Down

0 comments on commit b87db80

Please sign in to comment.