2015-08-12 00:27:07 +08:00
|
|
|
import { blank } from 'helpers/qunit-helpers';
|
2016-07-05 02:15:51 +08:00
|
|
|
import PreloadStore from 'preload-store';
|
|
|
|
|
2015-08-11 05:11:27 +08:00
|
|
|
module("helper:custom-html");
|
|
|
|
|
|
|
|
import { getCustomHTML, setCustomHTML } from 'discourse/helpers/custom-html';
|
|
|
|
|
|
|
|
test("customHTML", function() {
|
|
|
|
blank(getCustomHTML('evil'), "there is no custom HTML for a key by default");
|
|
|
|
|
|
|
|
setCustomHTML('evil', 'trout');
|
|
|
|
equal(getCustomHTML('evil'), 'trout', 'it retrieves the custom html');
|
|
|
|
|
|
|
|
PreloadStore.store('customHTML', {cookie: 'monster'});
|
|
|
|
equal(getCustomHTML('cookie'), 'monster', 'it returns HTML fragments from the PreloadStore');
|
|
|
|
});
|