License info provided by Sonatype.
diff --git a/tests/NuGetGallery.Facts/ViewModels/DisplayPackageViewModelFacts.cs b/tests/NuGetGallery.Facts/ViewModels/DisplayPackageViewModelFacts.cs index b5808d4663..eb324c5eda 100644 --- a/tests/NuGetGallery.Facts/ViewModels/DisplayPackageViewModelFacts.cs +++ b/tests/NuGetGallery.Facts/ViewModels/DisplayPackageViewModelFacts.cs @@ -104,6 +104,27 @@ public void ItInitializesProjectUrl(string projectUrl, string expected) Assert.Equal(expected, model.ProjectUrl); } + [Theory] + [InlineData("foo", "1.0.0", "https://www.fuget.org/packages/foo/1.0.0")] + [InlineData("foo", "1.1.0", "https://www.fuget.org/packages/foo/1.1.0")] + [InlineData("Foo.Bar", "1.1.0-bETa", "https://www.fuget.org/packages/Foo.Bar/1.1.0-bETa")] + public void ItInitializesFuGetUrl(string packageId, string packageVersion, string expected) + { + var package = new Package + { + Version = packageVersion, + NormalizedVersion = packageVersion, + PackageRegistration = new PackageRegistration + { + Id = packageId, + Owners = Enumerable.Empty