summaryrefslogtreecommitdiffstats
path: root/webapp/tests
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-09-02 12:50:15 -0400
committerGitHub <noreply@github.com>2016-09-02 12:50:15 -0400
commitf32eb525f3fa0828a23f589d765c267e3b2aea86 (patch)
treed4b76aecf89143029af080b3e1b4d87398e0adc5 /webapp/tests
parenteb0111f6bbe2b0bf160a674dfe1b4d089f905cb9 (diff)
downloadchat-f32eb525f3fa0828a23f589d765c267e3b2aea86.tar.gz
chat-f32eb525f3fa0828a23f589d765c267e3b2aea86.tar.bz2
chat-f32eb525f3fa0828a23f589d765c267e3b2aea86.zip
Do not send push notifications for channels being actively viewed (#3931)
Diffstat (limited to 'webapp/tests')
-rw-r--r--webapp/tests/client_channel.test.jsx1
-rw-r--r--webapp/tests/client_user.test.jsx17
2 files changed, 18 insertions, 0 deletions
diff --git a/webapp/tests/client_channel.test.jsx b/webapp/tests/client_channel.test.jsx
index 72ba91f9d..ccfcb32a4 100644
--- a/webapp/tests/client_channel.test.jsx
+++ b/webapp/tests/client_channel.test.jsx
@@ -216,6 +216,7 @@ describe('Client.Channels', function() {
var channel = TestHelper.basicChannel();
TestHelper.basicClient().updateLastViewedAt(
channel.id,
+ true,
function(data) {
assert.equal(data.id, channel.id);
done();
diff --git a/webapp/tests/client_user.test.jsx b/webapp/tests/client_user.test.jsx
index a0bddd08b..116eee4ae 100644
--- a/webapp/tests/client_user.test.jsx
+++ b/webapp/tests/client_user.test.jsx
@@ -509,6 +509,23 @@ describe('Client.User', function() {
});
*/
+ it('setActiveChannel', function(done) {
+ TestHelper.initBasic(() => {
+ var ids = [];
+ ids.push(TestHelper.basicUser().id);
+
+ TestHelper.basicClient().setActiveChannel(
+ TestHelper.basicChannel().id,
+ function() {
+ done();
+ },
+ function(err) {
+ done(new Error(err.message));
+ }
+ );
+ });
+ });
+
it('verifyEmail', function(done) {
TestHelper.initBasic(() => {
TestHelper.basicClient().enableLogErrorsToConsole(false); // Disabling since this unit test causes an error