Fix failing qunit test.

Fix failing qunit test.

diff --git a/test/javascripts/helpers/create-pretender.js.es6 b/test/javascripts/helpers/create-pretender.js.es6
index abc6ed5..08f530d 100644
--- a/test/javascripts/helpers/create-pretender.js.es6
+++ b/test/javascripts/helpers/create-pretender.js.es6
@@ -461,6 +461,16 @@ export default function() {
           email: "<small>discobot_email</small>"
         }
       ];
+
+      const showEmails = request.queryParams.show_emails;
+
+      if (showEmails === "false") {
+        store = store.map(item => {
+          delete item.email;
+          return item;
+        });
+      }
+
       const ascending = request.queryParams.ascending;
       const order = request.queryParams.order;
 
@@ -469,6 +479,7 @@ export default function() {
           return a[order] - b[order];
         });
       }
+
       if (ascending) {
         store = store.reverse();
       }

GitHub sha: 6cd42629

1 Like