test: Inline mkPhoto helper function
This commit is contained in:
parent
5e735e1b62
commit
796b1697b8
1 changed files with 4 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue