Skip to content

Commit

Permalink
Fix tests to work with blaze now.
Browse files Browse the repository at this point in the history
  • Loading branch information
queso committed Mar 28, 2014
1 parent d3d5185 commit 9966e90
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions tests/client.coffee
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
renderToDiv = (comp) ->
div = document.createElement("DIV")
UI.materialize comp, div
div

Tinytest.add "Accounts Entry - {{accountButtons}} helper", (test) ->
html = OnscreenDiv(Meteor.render(Template.test_helper_account_buttons))
test.notEqual html.rawHtml().indexOf("Sign In"), -1, "Account Buttons helper didn't render a sign in link."
test.notEqual html.rawHtml().indexOf("Sign Up"), -1, "Account Buttons helper didn't render a sign up link."
div = renderToDiv(Template.test_helper_account_buttons)
html = canonicalizeHtml(div.innerHTML)
debugger
test.notEqual html.indexOf("Sign In"), -1, "Account Buttons helper didn't render a sign in link."
test.notEqual html.indexOf("Sign Up"), -1, "Account Buttons helper didn't render a sign up link."
2 changes: 1 addition & 1 deletion tests/client.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
</template>

<template name="test_helper_account_buttons">
{{accountButtons}}
{{> accountButtons}}
</template>

0 comments on commit 9966e90

Please sign in to comment.