Skip to content

Instantly share code, notes, and snippets.

@zkessin
Created July 6, 2014 07:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zkessin/3f5fa716a1092862320b to your computer and use it in GitHub Desktop.
Save zkessin/3f5fa716a1092862320b to your computer and use it in GitHub Desktop.
prop_render() ->
{ok, online_users_dtl} = erlydtl:compile_file("templates/online_users.dtl", online_users_dtl, []),
?FORALL(Rs,
list(presence()),
begin
{ok,HTML} = vest_current_users:render(Rs),
mochiweb_html:parse(iolist_to_binary(HTML)), %% assert that it is valid HTML
[_Prefix,Rows,_Suffix] = HTML,
length(Rows) =:= length(Rs)
end).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment