mirror of
https://github.com/discourse/discourse.git
synced 2024-12-16 13:33:46 +08:00
14 lines
473 B
JavaScript
14 lines
473 B
JavaScript
module("Discourse.HTML");
|
|
|
|
import { getCustomHTML, setCustomHTML } from 'discourse/lib/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');
|
|
});
|