2013-10-25 15:23:29 -04:00
|
|
|
module("Discourse.HTML");
|
|
|
|
|
2015-01-20 16:07:13 -05:00
|
|
|
import { getCustomHTML, setCustomHTML } from 'discourse/lib/html';
|
2014-02-25 15:51:08 -05:00
|
|
|
|
|
|
|
test("customHTML", function() {
|
2015-01-20 16:07:13 -05:00
|
|
|
blank(getCustomHTML('evil'), "there is no custom HTML for a key by default");
|
2014-02-25 15:51:08 -05:00
|
|
|
|
2015-01-20 16:07:13 -05:00
|
|
|
setCustomHTML('evil', 'trout');
|
|
|
|
equal(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:07:13 -05:00
|
|
|
equal(getCustomHTML('cookie'), 'monster', 'it returns HTML fragments from the PreloadStore');
|
2014-02-25 15:51:08 -05:00
|
|
|
});
|