From d42a4f850ed13494f234d32d71f5697c1aaa65b0 Mon Sep 17 00:00:00 2001 From: Grzegorz Dziadkiewicz Date: Mon, 19 Dec 2022 22:17:23 +0100 Subject: [PATCH] Add test for new parameter. --- .../Fake.Core.UnitTests/Fake.DotNet.Paket.fs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/test/Fake.Core.UnitTests/Fake.DotNet.Paket.fs b/src/test/Fake.Core.UnitTests/Fake.DotNet.Paket.fs index 331e83c75a5..1e1face31e2 100644 --- a/src/test/Fake.Core.UnitTests/Fake.DotNet.Paket.fs +++ b/src/test/Fake.Core.UnitTests/Fake.DotNet.Paket.fs @@ -50,4 +50,20 @@ let tests = let cmd = args |> Arguments.toStartInfo Expect.stringContains (file.ToLower()) "paket" "Expected paket" - Expect.equal cmd "push testfile" "expected push command line" ] + Expect.equal cmd "push testfile" "expected push command line" + testCase "Test push --ignoreConflicts is not missing" + <| fun _ -> + let cp = + Paket.createProcess ( + Paket.StartType.PushFile({ Paket.PaketPushDefaults() with IgnoreConflicts = true }, "testfile") + ) + + let file, args = + match cp.Command with + | RawCommand (file, args) -> file, args + | _ -> failwithf "expected RawCommand" + |> ArgumentHelper.checkIfMono + + let cmd = args |> Arguments.toStartInfo + Expect.stringContains (file.ToLower()) "paket" "Expected paket" + Expect.equal cmd "push --ignoreConflicts testfile" "expected push command line" ]