Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

node fixtures: Make attachment data realistic.

Steve Howelle00e22553eee
diff --git a/frontend_tests/node_tests/lib/events.js b/frontend_tests/node_tests/lib/events.js
index 2dbdd72781c..3739e2c1eb3 100644
--- a/frontend_tests/node_tests/lib/events.js
+++ b/frontend_tests/node_tests/lib/events.js
@@ -32,6 +32,8 @@ const typing_person2 = {
exports.typing_person1 = typing_person1;
exports.typing_person2 = typing_person2;
+const fake_now = 1596713966;
+
exports.test_streams = {
devel: {
name: "devel",
@@ -90,7 +92,20 @@ exports.fixtures = {
attachment__add: {
type: "attachment",
op: "add",
- // missing data due to shallow test
+ attachment: {
+ id: 99,
+ name: "foo.png",
+ size: 4096,
+ path_id: "path_id",
+ create_time: fake_now,
+ messages: [
+ {
+ id: 1000,
+ date_sent: fake_now,
+ },
+ ],
+ },
+ upload_space_used: 90000,
},
custom_profile_fields__update: {