Skip to content

Instantly share code, notes, and snippets.

@davisp
Created July 27, 2016 16:46
Show Gist options
  • Select an option

  • Save davisp/c6e70ea08b275a3b66ad69aae1a2be5d to your computer and use it in GitHub Desktop.

Select an option

Save davisp/c6e70ea08b275a3b66ad69aae1a2be5d to your computer and use it in GitHub Desktop.
check_welcome() ->
?http_match(
?http(get, "/"),
[
?status(200),
?hdrinc(["Server", "Date", "Content-Length"]),
?hdrmatch("Content-Type", "application/json"),
?bodyjson([
?has_entry({couchdb, <<"Welcome!">>}),
?has_key(version),
?has_key(vendor),
?has_key(features)
])
]
).
check_welcome() ->
Resp = ?http(get, "/"),
?status(Resp, 200),
?hdrinc(Resp, ["Server", "Date", "Content-Length"]),
?hdrmatch(Resp, "Content-Type", "application/json"),
?body_json(Resp, [
?has_entry({couchdb, <<"Welcome!">>}),
?has_key(version),
?has_key(vendor),
?has_key(features)
]).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment