Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure we have at least a dependency when testing package license #15

Merged
merged 1 commit into from
Oct 8, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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