update Tests to account for "active" param
Signed-off-by: Will Hegedus <wbhegedus@liberty.edu>
This commit is contained in:
parent
96a33e1bc6
commit
5a5133af7e
|
@ -33,11 +33,7 @@ parseMatcher =
|
||||||
generateQueryString : Test
|
generateQueryString : Test
|
||||||
generateQueryString =
|
generateQueryString =
|
||||||
describe "generateQueryString"
|
describe "generateQueryString"
|
||||||
[ test "should default silenced & inhibited parameters to false and active to true if showSilenced is Nothing" <|
|
[ 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 })
|
|
||||||
, test "should not render keys with Nothing value except the silenced and inhibited parameters" <|
|
|
||||||
\() ->
|
\() ->
|
||||||
Expect.equal "?silenced=false&inhibited=false&active=true"
|
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 })
|
(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"
|
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 })
|
(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" <|
|
, test "should add customGrouping key" <|
|
||||||
\() ->
|
\() ->
|
||||||
Expect.equal "?silenced=false&inhibited=false&active=true&customGrouping=true"
|
Expect.equal "?silenced=false&inhibited=false&active=true&customGrouping=true"
|
||||||
|
|
Loading…
Reference in New Issue