test: Inline mkPhoto helper function

This commit is contained in:
Alexander Kobjolke 2023-12-17 12:17:18 +01:00
parent 5e735e1b62
commit 796b1697b8

View file

@ -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