mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 09:57:25 +08:00
DEV: Use type
instead of method
in ajax calls (#8974)
Even though `type` is an alias for `method`, we have custom logic in `/discourse/lib/ajax` that checks only `type`, and ~200 other ajax calls in the codebase already use `type` param.
This commit is contained in:
@ -100,13 +100,11 @@ QUnit.test("creating simultaneously", assert => {
|
||||
});
|
||||
});
|
||||
|
||||
QUnit.test("destroyRecord", assert => {
|
||||
QUnit.test("destroyRecord", async assert => {
|
||||
const store = createStore();
|
||||
return store.find("widget", 123).then(function(widget) {
|
||||
widget.destroyRecord().then(function(result) {
|
||||
assert.ok(result);
|
||||
});
|
||||
});
|
||||
const widget = await store.find("widget", 123);
|
||||
|
||||
assert.ok(await widget.destroyRecord());
|
||||
});
|
||||
|
||||
QUnit.test("custom api name", async assert => {
|
||||
|
Reference in New Issue
Block a user