mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-25 09:21:57 +03:00
Migrate use of old Form type.
This commit is contained in:
parent
f77db01796
commit
320374cee7
@ -62,21 +62,27 @@ all =
|
||||
[ ( "q", "hello" ) ]
|
||||
, test "tries multiple form post formats" <|
|
||||
\() ->
|
||||
Request.formDataWithoutServerValidation
|
||||
[ Form.init
|
||||
Request.formDataWithoutServerValidation2
|
||||
[ Form.init2
|
||||
(\bar ->
|
||||
Validation.succeed identity
|
||||
|> Validation.andMap bar
|
||||
{ combine =
|
||||
Validation.succeed identity
|
||||
|> Validation.andMap bar
|
||||
, view =
|
||||
\_ -> ()
|
||||
}
|
||||
)
|
||||
(\_ _ -> ())
|
||||
|> Form.field "bar" Field.text
|
||||
, Form.init
|
||||
|> Form.field2 "bar" Field.text
|
||||
, Form.init2
|
||||
(\bar ->
|
||||
Validation.succeed identity
|
||||
|> Validation.andMap bar
|
||||
{ combine =
|
||||
Validation.succeed identity
|
||||
|> Validation.andMap bar
|
||||
, view =
|
||||
\_ -> ()
|
||||
}
|
||||
)
|
||||
(\_ _ -> ())
|
||||
|> Form.field "foo" Field.text
|
||||
|> Form.field2 "foo" Field.text
|
||||
]
|
||||
|> expectMatch
|
||||
{ method = Request.Post
|
||||
@ -92,14 +98,17 @@ all =
|
||||
}
|
||||
, test "expectFormPost with missing content-type" <|
|
||||
\() ->
|
||||
Request.formDataWithoutServerValidation
|
||||
[ Form.init
|
||||
Request.formDataWithoutServerValidation2
|
||||
[ Form.init2
|
||||
(\bar ->
|
||||
Validation.succeed identity
|
||||
|> Validation.andMap bar
|
||||
{ combine =
|
||||
Validation.succeed identity
|
||||
|> Validation.andMap bar
|
||||
, view =
|
||||
\_ -> ()
|
||||
}
|
||||
)
|
||||
(\_ _ -> ())
|
||||
|> Form.field "bar" Field.text
|
||||
|> Form.field2 "bar" Field.text
|
||||
]
|
||||
|> expectNoMatch
|
||||
{ method = Request.Post
|
||||
|
Loading…
Reference in New Issue
Block a user