From 5a5133af7e51ac9397b5045bc6c5ca50b22ff984 Mon Sep 17 00:00:00 2001 From: Will Hegedus Date: Fri, 10 May 2019 09:56:58 -0400 Subject: [PATCH] update Tests to account for "active" param Signed-off-by: Will Hegedus --- ui/app/tests/Filter.elm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/app/tests/Filter.elm b/ui/app/tests/Filter.elm index aab6b703..be0f9e44 100644 --- a/ui/app/tests/Filter.elm +++ b/ui/app/tests/Filter.elm @@ -33,11 +33,7 @@ parseMatcher = generateQueryString : Test generateQueryString = describe "generateQueryString" - [ test "should default silenced & inhibited parameters to false and active to true if showSilenced is Nothing" <| - \() -> - Expect.equal "?silenced=false&inhibited=false&active=true" - (Utils.Filter.generateQueryString { receiver = Nothing, group = Nothing, customGrouping = False, text = Nothing, showSilenced = Nothing, showInhibited = Nothing, showActive = Nothing }) - , test "should not render keys with Nothing value except the silenced and inhibited parameters" <| + [ test "should not render keys with Nothing value except the silenced, inhibited, and active parameters, which default to false, false, true, respectively." <| \() -> Expect.equal "?silenced=false&inhibited=false&active=true" (Utils.Filter.generateQueryString { receiver = Nothing, group = Nothing, customGrouping = False, text = Nothing, showSilenced = Nothing, showInhibited = Nothing, showActive = Nothing }) @@ -57,6 +53,10 @@ generateQueryString = \() -> Expect.equal "?silenced=false&inhibited=true&active=true" (Utils.Filter.generateQueryString { receiver = Nothing, group = Nothing, customGrouping = False, text = Nothing, showSilenced = Nothing, showInhibited = Just True, showActive = Nothing }) + , test "should render active key with bool" <| + \() -> + Expect.equal "?silenced=false&inhibited=false&active=false" + (Utils.Filter.generateQueryString { receiver = Nothing, group = Nothing, customGrouping = False, text = Nothing, showSilenced = Nothing, showInhibited = Nothing, showActive = Just False }) , test "should add customGrouping key" <| \() -> Expect.equal "?silenced=false&inhibited=false&active=true&customGrouping=true"