2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

Add acceptance tests for custom-html

This commit is contained in:
Robin Ward 2016-11-23 12:57:50 -05:00
parent 79dc0518c9
commit ae4fd06444
6 changed files with 61 additions and 24 deletions

View file

@ -0,0 +1,18 @@
import { acceptance } from "helpers/qunit-helpers";
acceptance("CustomHTML template", {
setup() {
Ember.TEMPLATES['top'] = Ember.HTMLBars.compile(`<span class='top-span'>TOP</span>`);
},
teardown() {
delete Ember.TEMPLATES['top'];
}
});
test("renders custom template", assert => {
visit("/static/faq");
andThen(() => {
assert.equal(find('span.top-span').text(), 'TOP', 'it inserted the template');
});
});