mirror of
https://github.com/discourse/discourse.git
synced 2024-12-05 08:48:24 +08:00
17 lines
578 B
JavaScript
17 lines
578 B
JavaScript
import { blank } from 'helpers/qunit-helpers';
|
|
import PreloadStore from 'preload-store';
|
|
|
|
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');
|
|
});
|