discourse/test/javascripts/lib/html-test.js.es6

14 lines
473 B
Plaintext
Raw Normal View History

module("Discourse.HTML");
2015-01-20 16:07:13 -05:00
import { getCustomHTML, setCustomHTML } from 'discourse/lib/html';
test("customHTML", function() {
2015-01-20 16:07:13 -05:00
blank(getCustomHTML('evil'), "there is no custom HTML for a key by default");
2015-01-20 16:07:13 -05:00
setCustomHTML('evil', 'trout');
equal(getCustomHTML('evil'), 'trout', 'it retrieves the custom html');
PreloadStore.store('customHTML', {cookie: 'monster'});
2015-01-20 16:07:13 -05:00
equal(getCustomHTML('cookie'), 'monster', 'it returns HTML fragments from the PreloadStore');
});