summaryrefslogtreecommitdiffstats
path: root/webapp/tests
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-09-22 08:31:38 -0400
committerGitHub <noreply@github.com>2016-09-22 08:31:38 -0400
commitefdb0dfa0b422b24a6fbed2c4752484494a78857 (patch)
treede94d8ae0f9e6c9bc91e504d93dc7f55219da52f /webapp/tests
parentde79343b9aa9dc601e5633cef329e1a83452aa1a (diff)
downloadchat-efdb0dfa0b422b24a6fbed2c4752484494a78857.tar.gz
chat-efdb0dfa0b422b24a6fbed2c4752484494a78857.tar.bz2
chat-efdb0dfa0b422b24a6fbed2c4752484494a78857.zip
Fixing update roles API (#4060)
Diffstat (limited to 'webapp/tests')
-rw-r--r--webapp/tests/client_team.test.jsx19
-rw-r--r--webapp/tests/client_user.test.jsx15
2 files changed, 25 insertions, 9 deletions
diff --git a/webapp/tests/client_team.test.jsx b/webapp/tests/client_team.test.jsx
index 389a6ef50..157a2f4a5 100644
--- a/webapp/tests/client_team.test.jsx
+++ b/webapp/tests/client_team.test.jsx
@@ -240,5 +240,24 @@ describe('Client.Team', function() {
);
});
});
+
+ it('updateTeamMemberRoles', function(done) {
+ TestHelper.initBasic(() => {
+ var user = TestHelper.basicUser();
+ var team = TestHelper.basicTeam();
+
+ TestHelper.basicClient().updateTeamMemberRoles(
+ team.id,
+ user.id,
+ '',
+ function() {
+ done();
+ },
+ function(err) {
+ done(new Error(err.message));
+ }
+ );
+ });
+ });
});
diff --git a/webapp/tests/client_user.test.jsx b/webapp/tests/client_user.test.jsx
index 6c65e8ef5..48a0150d4 100644
--- a/webapp/tests/client_user.test.jsx
+++ b/webapp/tests/client_user.test.jsx
@@ -211,21 +211,18 @@ describe('Client.User', function() {
});
});
- it('updateRoles', function(done) {
+ it('updateUserRoles', function(done) {
TestHelper.initBasic(() => {
var user = TestHelper.basicUser();
- var team = TestHelper.basicTeam();
- TestHelper.basicClient().updateRoles(
- team.id,
+ TestHelper.basicClient().updateUserRoles(
user.id,
'',
- function(data) {
- assert.equal(data.user_id, user.id);
- done();
+ function() {
+ done(new Error('Not supposed to work'));
},
- function(err) {
- done(new Error(err.message));
+ function() {
+ done();
}
);
});