mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 13:51:09 +08:00
FEATURE: View flags grouped by topic
This commit is contained in:
11
test/javascripts/acceptance/admin-flags-topics-test.js.es6
Normal file
11
test/javascripts/acceptance/admin-flags-topics-test.js.es6
Normal file
@ -0,0 +1,11 @@
|
||||
import { acceptance } from "helpers/qunit-helpers";
|
||||
acceptance("Admin - Flagged Topics", { loggedIn: true });
|
||||
|
||||
QUnit.test("topics with flags", assert => {
|
||||
visit("/admin/flags/topics");
|
||||
andThen(() => {
|
||||
assert.ok(exists('.watched-words-list'));
|
||||
assert.ok(!exists('.watched-words-list .watched-word'), "Don't show bad words by default.");
|
||||
});
|
||||
});
|
||||
|
@ -323,6 +323,14 @@ export default function() {
|
||||
]);
|
||||
});
|
||||
|
||||
this.get('/admin/flagged_topics', () => {
|
||||
return response(200, {
|
||||
"flagged_topics": [
|
||||
{ id: 1 }
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
this.get('/admin/customize/site_texts', request => {
|
||||
|
||||
if (request.queryParams.overridden) {
|
||||
|
@ -13,7 +13,6 @@ export default function() {
|
||||
if (type === "adapter:rest") {
|
||||
if (!this._restAdapter) {
|
||||
this._restAdapter = RestAdapter.create({ owner: this });
|
||||
// this._restAdapter.container = this;
|
||||
}
|
||||
return this._restAdapter;
|
||||
}
|
||||
@ -37,4 +36,4 @@ export default function() {
|
||||
},
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user