reactions_tests: Remove misleading emoji_params.realm_emoji.zulip obj.

Previously, this test file had an object that encouraged one to
believe that it is defining a realm_emoji with the name, id = "zulip"
and a custom source url, but this is false.
The "zulip" emoji is a special case that's added to our data
structures by the `/shared/emoji.js` code.
Notice how the test never asserts that the returned url is equal to
the source_url defined, it just asserts that the source url is equal
to "/static/generated/emoji/images/emoji/unicode/zulip.png" (which is
the value defined in `/share/emoji.js`).

Hence, we remove this object and replace any references to it with the
values defined in `/shared/emoji.js`.
This commit is contained in:
YashRE42 2021-11-21 00:30:38 +05:30 committed by Tim Abbott
parent 263a79738f
commit bfc705be8f

View File

@ -80,12 +80,6 @@ const emoji_params = {
source_url: "/url/for/992",
deactivated: true,
},
zulip: {
id: "zulip",
name: "zulip",
source_url: "/url/for/zulip",
deactivated: false,
},
},
emoji_codes,
};
@ -621,14 +615,12 @@ test("view.insert_new_reaction (me w/unicode emoji)", ({override, mock_template}
});
test("view.insert_new_reaction (them w/zulip emoji)", ({override, mock_template}) => {
const zulip_emoji = emoji_params.realm_emoji.zulip;
const opts = {
message_id: 502,
reaction_type: "realm_emoji",
emoji_name: "zulip",
emoji_code: zulip_emoji.id,
emoji_code: "zulip",
user_id: bob.user_id,
source_url: zulip_emoji.source_url,
};
const message_reactions = $.create("our-reactions");