From d402b1d010a56256f15bb482684c18b10ed4bcc5 Mon Sep 17 00:00:00 2001
From: Carlos Tadeu Panato Junior <ctadeu@gmail.com>
Date: Thu, 8 Dec 2016 16:21:43 +0100
Subject: Add API call to get a team by its name (#4690)

* Add API call to get a team by its name

* add tests for client side and update route regex

* remove action

* add check for permissions and create tests
---
 webapp/tests/client_team.test.jsx | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

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

diff --git a/webapp/tests/client_team.test.jsx b/webapp/tests/client_team.test.jsx
index 13b2802d2..009d084f8 100644
--- a/webapp/tests/client_team.test.jsx
+++ b/webapp/tests/client_team.test.jsx
@@ -328,5 +328,21 @@ describe('Client.Team', function() {
             );
         });
     });
+
+    it('getTeamByName', function(done) {
+        TestHelper.initBasic(() => {
+            TestHelper.basicClient().getTeamByName(
+                TestHelper.basicTeam().name,
+                function(data) {
+                    console.log(data);
+                    assert.equal(data.name, TestHelper.basicTeam().name);
+                    done();
+                },
+                function(err) {
+                    done(new Error(err.message));
+                }
+            );
+        });
+    });
 });
 
-- 
cgit v1.2.3-1-g7c22

