Skip to content

Commit

Permalink
add failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
theimowski committed Mar 24, 2015
1 parent 6488a1f commit f63ff9f
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
17 changes: 17 additions & 0 deletions tests/Paket.Tests/NuGetConfig/ConfigWithDisabledFeed.xml
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
<packageSources>
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
<add key="MyGetDuality" value="https://www.myget.org/F/6416d9912a7c4d46bc983870fb440d25/" />
</packageSources>
<disabledPackageSources>
<add key="MyGetDuality" value="true" />
</disabledPackageSources>
<activePackageSource>
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
</activePackageSource>
</configuration>
11 changes: 10 additions & 1 deletion tests/Paket.Tests/NuGetConfig/NuGetConfigSpecs.fs
Expand Up @@ -47,4 +47,13 @@ let ``can detect cleartextpasswords in nuget.config``() =
"https://nuget/somewhere/",
Some { Username = "myUser"; Password = "myPassword" } ]
PackageRestoreEnabled = false
PackageRestoreAutomatic = false }
PackageRestoreAutomatic = false }

[<Test>]
let ``ignores disabled nuget feed`` () =
parse "NuGetConfig/ConfigWithDisabledFeed.xml"
|> shouldEqual
{ PackageSources =
[ "https://www.nuget.org/api/v2/",None]
PackageRestoreEnabled = true
PackageRestoreAutomatic = true }
7 changes: 5 additions & 2 deletions tests/Paket.Tests/Paket.Tests.fsproj
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
Expand Down Expand Up @@ -159,6 +159,9 @@
<Content Include="NuGetConfig\PasswordConfig.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="NuGetConfig\ConfigWithDisabledFeed.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Compile Include="NuGetConfig\NuGetConfigSpecs.fs" />
<Content Include="JSON-LD\Rx-PlatformServices.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
Expand Down Expand Up @@ -208,7 +211,7 @@
</None>
<None Include="ProjectFile\TestData\CustomFantomasNode.fsprojtest">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</None>
<None Include="ProjectFile\TestData\CustomPaketFantomasNode.fsprojtest">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand Down

0 comments on commit f63ff9f

Please sign in to comment.