mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 14:42:46 +08:00
fix qunit tests
This commit is contained in:
parent
c49731a91b
commit
6a2ffa9415
|
@ -77,21 +77,21 @@ test("quote formatting", function() {
|
|||
// TODO: This HTML matching is quite ugly.
|
||||
format("[quote=\"eviltrout, post:1, topic:1\"]abc[/quote]",
|
||||
"</p><aside class='quote' data-post=\"1\" data-topic=\"1\" >\n <div class='title'>\n " +
|
||||
"<div class='quote-controls'></div>\n \n eviltrout\n said:\n </div>\n <blockquote>abc</blockquote>\n</aside>\n<p>",
|
||||
"<div class='quote-controls'></div>\n \n eviltrout said:\n </div>\n <blockquote>abc</blockquote>\n</aside>\n<p>",
|
||||
"renders quotes properly");
|
||||
|
||||
format("[quote=\"eviltrout, post:1, topic:1\"]abc[quote=\"eviltrout, post:2, topic:2\"]nested[/quote][/quote]",
|
||||
"</p><aside class='quote' data-post=\"1\" data-topic=\"1\" >\n <div class='title'>\n <div " +
|
||||
"class='quote-controls'></div>\n \n eviltrout\n said:\n </div>\n <blockquote>abc</p><aside " +
|
||||
"class='quote-controls'></div>\n \n eviltrout said:\n </div>\n <blockquote>abc</p><aside " +
|
||||
"class='quote' data-post=\"2\" data-topic=\"2\" >\n <div class='title'>\n <div class='quote-" +
|
||||
"controls'></div>\n \n eviltrout\n said:\n </div>\n <blockquote>nested</blockquote>\n</aside>\n<p></blockquote>\n</aside>\n<p>",
|
||||
"controls'></div>\n \n eviltrout said:\n </div>\n <blockquote>nested</blockquote>\n</aside>\n<p></blockquote>\n</aside>\n<p>",
|
||||
"can nest quotes");
|
||||
|
||||
format("before[quote=\"eviltrout, post:1, topic:1\"]first[/quote]middle[quote=\"eviltrout, post:2, topic:2\"]second[/quote]after",
|
||||
"before</p><aside class='quote' data-post=\"1\" data-topic=\"1\" >\n <div class='title'>\n <div class='quote-cont" +
|
||||
"rols'></div>\n \n eviltrout\n said:\n </div>\n <blockquote>first</blockquote>\n</aside>\n<p>middle</p><aside cla" +
|
||||
"rols'></div>\n \n eviltrout said:\n </div>\n <blockquote>first</blockquote>\n</aside>\n<p>middle</p><aside cla" +
|
||||
"ss='quote' data-post=\"2\" data-topic=\"2\" >\n <div class='title'>\n <div class='quote-controls'></div>\n \n " +
|
||||
"eviltrout\n said:\n </div>\n <blockquote>second</blockquote>\n</aside>\n<p>after",
|
||||
"eviltrout said:\n </div>\n <blockquote>second</blockquote>\n</aside>\n<p>after",
|
||||
"can handle more than one quote");
|
||||
|
||||
});
|
||||
|
|
|
@ -69,13 +69,13 @@ test("Quotes", function() {
|
|||
cookedOptions("1[quote=\"bob, post:1\"]my quote[/quote]2",
|
||||
{ topicId: 2, lookupAvatar: function(name) { return "" + name; } },
|
||||
"<p>1</p><aside class='quote' data-post=\"1\" >\n <div class='title'>\n <div class='quote-controls'></div>\n" +
|
||||
" bob\n bob\n said:\n </div>\n <blockquote>my quote</blockquote>\n</aside>\n<p></p>\n\n<p>2</p>",
|
||||
" bob\n bob said:\n </div>\n <blockquote>my quote</blockquote>\n</aside>\n<p></p>\n\n<p>2</p>",
|
||||
"handles quotes properly");
|
||||
|
||||
cookedOptions("1[quote=\"bob, post:1\"]my quote[/quote]2",
|
||||
{ topicId: 2, lookupAvatar: function(name) { } },
|
||||
"<p>1</p><aside class='quote' data-post=\"1\" >\n <div class='title'>\n <div class='quote-controls'></div>\n" +
|
||||
" \n bob\n said:\n </div>\n <blockquote>my quote</blockquote>\n</aside>\n<p></p>\n\n<p>2</p>",
|
||||
" \n bob said:\n </div>\n <blockquote>my quote</blockquote>\n</aside>\n<p></p>\n\n<p>2</p>",
|
||||
"includes no avatar if none is found");
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user