mirror of
https://github.com/bsima/haskell-urbit-api.git
synced 2024-09-11 18:27:08 +03:00
add failing ack test
This commit is contained in:
parent
153ba3bf2b
commit
d60f5b7168
@ -7,6 +7,7 @@ module Urbit.Airlock
|
||||
Mark,
|
||||
connect,
|
||||
poke,
|
||||
ack,
|
||||
)
|
||||
where
|
||||
|
||||
|
16
test.hs
16
test.hs
@ -19,12 +19,15 @@ main :: IO ()
|
||||
main = do
|
||||
let ship = fakezod
|
||||
|
||||
testing "ship connection" $ isJust <$> do
|
||||
testing "ship connection" $
|
||||
isJust <$> do
|
||||
r <- connect ship
|
||||
return $ r ^? Wreq.responseBody
|
||||
|
||||
testing "poke ship" $ isJust <$> do
|
||||
r <- (poke ship "zod" "chat-hook" "json" $
|
||||
testing "poke ship" $
|
||||
isJust <$> do
|
||||
r <-
|
||||
poke ship "zod" "chat-hook" "json" $
|
||||
Aeson.object
|
||||
[ "message"
|
||||
.= Aeson.object
|
||||
@ -38,7 +41,12 @@ main = do
|
||||
"letter" .= Aeson.object ["text" .= Text.pack "hello world!"]
|
||||
]
|
||||
]
|
||||
])
|
||||
]
|
||||
return $ r ^? Wreq.responseBody
|
||||
|
||||
testing "ack" $
|
||||
isJust <$> do
|
||||
r <- ack ship 1
|
||||
return $ r ^? Wreq.responseBody
|
||||
|
||||
fakezod :: Ship
|
||||
|
Loading…
Reference in New Issue
Block a user