From 796b1697b88ad09f40731c0e79f82ce1c6f8d277 Mon Sep 17 00:00:00 2001 From: Alexander Kobjolke Date: Sun, 17 Dec 2023 12:17:18 +0100 Subject: [PATCH] test: Inline mkPhoto helper function --- tests/PhotoGrooveTest.elm | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/PhotoGrooveTest.elm b/tests/PhotoGrooveTest.elm index 0a3a767..e93ae28 100644 --- a/tests/PhotoGrooveTest.elm +++ b/tests/PhotoGrooveTest.elm @@ -13,14 +13,11 @@ suite = describe "photoDecoder" [ fuzz2 Fuzz.string Fuzz.int "title always defaults to '(untitled)'" <| \url size -> - mkPhoto url size + [ ( "url", Encode.string url ) + , ( "size", Encode.int size ) + ] + |> Encode.object |> J.decodeValue Testee.photoDecoder |> Result.map .title |> Expect.equal (Ok "(untitled)") ] - - -mkPhoto : String -> Int -> Value -mkPhoto url size = - [ ( "url", Encode.string url ), ( "size", Encode.int size ) ] - |> Encode.object