From 76fa840b52ea79f05e5e681abca92b279de78182 Mon Sep 17 00:00:00 2001
From: Joram Wilander <jwawilander@gmail.com>
Date: Tue, 28 Feb 2017 04:31:53 -0500
Subject: Move webhook logic from api layer to app layer (#5527)

* Move webhook logic from api layer to app layer

* Consolidate error messages

* Fix permission check and unit test
---
 webapp/tests/client_hooks.test.jsx | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

(limited to 'webapp/tests/client_hooks.test.jsx')

diff --git a/webapp/tests/client_hooks.test.jsx b/webapp/tests/client_hooks.test.jsx
index 841d87b7a..db72bce18 100644
--- a/webapp/tests/client_hooks.test.jsx
+++ b/webapp/tests/client_hooks.test.jsx
@@ -22,7 +22,7 @@ describe('Client.Hooks', function() {
                     done(new Error('hooks not enabled'));
                 },
                 function(err) {
-                    assert.equal(err.id, 'api.webhook.create_incoming.disabled.app_error');
+                    assert.equal(err.id, 'api.incoming_webhook.disabled.app_error');
                     done();
                 }
             );
@@ -44,7 +44,7 @@ describe('Client.Hooks', function() {
                     done(new Error('hooks not enabled'));
                 },
                 function(err) {
-                    assert.equal(err.id, 'api.webhook.update_incoming.disabled.app_error');
+                    assert.equal(err.id, 'api.incoming_webhook.disabled.app_error');
                     done();
                 }
             );
@@ -60,7 +60,7 @@ describe('Client.Hooks', function() {
                     done(new Error('hooks not enabled'));
                 },
                 function(err) {
-                    assert.equal(err.id, 'api.webhook.delete_incoming.disabled.app_error');
+                    assert.equal(err.id, 'api.incoming_webhook.disabled.app_error');
                     done();
                 }
             );
@@ -75,7 +75,7 @@ describe('Client.Hooks', function() {
                     done(new Error('hooks not enabled'));
                 },
                 function(err) {
-                    assert.equal(err.id, 'api.webhook.get_incoming.disabled.app_error');
+                    assert.equal(err.id, 'api.incoming_webhook.disabled.app_error');
                     done();
                 }
             );
@@ -97,7 +97,7 @@ describe('Client.Hooks', function() {
                     done(new Error('hooks not enabled'));
                 },
                 function(err) {
-                    assert.equal(err.id, 'api.webhook.create_outgoing.disabled.app_error');
+                    assert.equal(err.id, 'api.outgoing_webhook.disabled.app_error');
                     done();
                 }
             );
@@ -113,7 +113,7 @@ describe('Client.Hooks', function() {
                     done(new Error('hooks not enabled'));
                 },
                 function(err) {
-                    assert.equal(err.id, 'api.webhook.delete_outgoing.disabled.app_error');
+                    assert.equal(err.id, 'api.outgoing_webhook.disabled.app_error');
                     done();
                 }
             );
@@ -128,7 +128,7 @@ describe('Client.Hooks', function() {
                     done(new Error('hooks not enabled'));
                 },
                 function(err) {
-                    assert.equal(err.id, 'api.webhook.get_outgoing.disabled.app_error');
+                    assert.equal(err.id, 'api.outgoing_webhook.disabled.app_error');
                     done();
                 }
             );
@@ -144,7 +144,7 @@ describe('Client.Hooks', function() {
                     done(new Error('hooks not enabled'));
                 },
                 function(err) {
-                    assert.equal(err.id, 'api.webhook.regen_outgoing_token.disabled.app_error');
+                    assert.equal(err.id, 'api.outgoing_webhook.disabled.app_error');
                     done();
                 }
             );
@@ -166,7 +166,7 @@ describe('Client.Hooks', function() {
                     done(new Error('hooks not enabled'));
                 },
                 function(err) {
-                    assert.equal(err.id, 'api.webhook.update_outgoing.disabled.app_error');
+                    assert.equal(err.id, 'api.outgoing_webhook.disabled.app_error');
                     done();
                 }
             );
-- 
cgit v1.2.3-1-g7c22

