2013-10-25 15:23:29 -04:00
|
|
|
module("Discourse.HTML");
|
|
|
|
|
2015-01-20 16:13:42 -05:00
|
|
|
var html = Discourse.HTML;
|
2014-02-25 15:51:08 -05:00
|
|
|
|
|
|
|
test("customHTML", function() {
|
2015-01-20 16:13:42 -05:00
|
|
|
blank(html.getCustomHTML('evil'), "there is no custom HTML for a key by default");
|
2014-02-25 15:51:08 -05:00
|
|
|
|
2015-01-20 16:13:42 -05:00
|
|
|
html.setCustomHTML('evil', 'trout');
|
|
|
|
equal(html.getCustomHTML('evil'), 'trout', 'it retrieves the custom html');
|
2014-02-25 15:51:08 -05:00
|
|
|
|
|
|
|
PreloadStore.store('customHTML', {cookie: 'monster'});
|
2015-01-20 16:13:42 -05:00
|
|
|
equal(html.getCustomHTML('cookie'), 'monster', 'it returns HTML fragments from the PreloadStore');
|
|
|
|
|
2014-02-25 15:51:08 -05:00
|
|
|
});
|