mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 08:07:17 +08:00
FIX: Permit unpinning an unlisted topic.
This commit is contained in:
@ -7,6 +7,18 @@ acceptance("Topic", {
|
||||
server.put("/posts/398/wiki", () => {
|
||||
return helper.response({});
|
||||
});
|
||||
|
||||
server.get("/topics/feature_stats.json", () => {
|
||||
return helper.response({
|
||||
pinned_in_category_count: 0,
|
||||
pinned_globally_count: 0,
|
||||
banner_count: 0
|
||||
});
|
||||
});
|
||||
|
||||
server.put("/t/280/make-banner", () => {
|
||||
return helper.response({});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@ -215,6 +227,23 @@ QUnit.test("remove featured link", async assert => {
|
||||
// assert.ok(!exists('.title-wrapper .topic-featured-link'), 'link is gone');
|
||||
});
|
||||
|
||||
QUnit.test("Unpinning unlisted topic", async assert => {
|
||||
await visit("/t/internationalization-localization/280");
|
||||
|
||||
await click(".toggle-admin-menu");
|
||||
await click(".topic-admin-pin .btn");
|
||||
await click(".btn-primary:last");
|
||||
|
||||
await click(".toggle-admin-menu");
|
||||
await click(".topic-admin-visible .btn");
|
||||
|
||||
await click(".toggle-admin-menu");
|
||||
assert.ok(
|
||||
exists(".topic-admin-pin"),
|
||||
"it should show the multi select menu"
|
||||
);
|
||||
});
|
||||
|
||||
QUnit.test("selecting posts", async assert => {
|
||||
await visit("/t/internationalization-localization/280");
|
||||
await click(".toggle-admin-menu");
|
||||
|
Reference in New Issue
Block a user