DEV: Simplify emoji-uploader tests (#15672)

Removes one layer of indirection in the tests. `emoji-uploader`'s
`uploadDone` can call the test handler directly without going through
an additional action method.
This commit is contained in:
Dan Ungureanu 2022-01-21 19:51:04 +02:00 committed by GitHub
parent a0c040060a
commit d0f4f408af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,7 +17,7 @@ discourseModule("Integration | Component | emoji-uploader", function (hooks) {
const template = hbs` {{emoji-uploader
emojiGroups=emojiGroups
done=(action "emojiUploaded")
done=doneUpload
id="emoji-uploader"
}}`;
@ -25,11 +25,6 @@ discourseModule("Integration | Component | emoji-uploader", function (hooks) {
requestNumber = 1;
this.setProperties({
emojiGroups: ["default", "coolemojis"],
actions: {
emojiUploaded: (upload, group) => {
this.doneUpload(upload, group);
},
},
});
pretender.post("/admin/customize/emojis.json", () => {