mirror of
https://github.com/Start9Labs/registry.git
synced 2026-03-26 10:21:51 +00:00
handle proper version info parsing
This commit is contained in:
@@ -6,11 +6,24 @@ import Startlude
|
||||
import TestImport
|
||||
|
||||
spec :: Spec
|
||||
spec = describe "GET /apps" $
|
||||
spec = do
|
||||
describe "GET /apps" $
|
||||
withApp $ it "returns list of apps" $ do
|
||||
request $ do
|
||||
setMethod "GET"
|
||||
setUrl ("/apps" :: Text)
|
||||
bodyContains "bitcoind"
|
||||
bodyContains "version: 0.18.1"
|
||||
statusIs 200
|
||||
describe "GET /apps/:appId" $
|
||||
withApp $ it "fails to get unknown app" $ do
|
||||
request $ do
|
||||
setMethod "GET"
|
||||
setUrl ("/apps/bitcoind.s9pk?spec=0.18.2" :: Text)
|
||||
statusIs 404
|
||||
describe "GET /apps/:appId" $
|
||||
withApp $ it "makes da records" $ do
|
||||
request $ do
|
||||
setMethod "GET"
|
||||
setUrl ("/apps/bitcoind.s9pk?spec=0.18.1" :: Text)
|
||||
statusIs 200
|
||||
Reference in New Issue
Block a user