Adding edit of incoming webhook (#5272)
Adding edit of outgoing webhook Fixing spelling of error Fixing style Changing from PUT to POST for updates Fixing test failures due to merge
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
c0bb6f99f8
Коммит
19b753467d
@@ -22,7 +22,29 @@ describe('Client.Hooks', function() {
|
||||
done(new Error('hooks not enabled'));
|
||||
},
|
||||
function(err) {
|
||||
assert.equal(err.id, 'api.webhook.create_incoming.disabled.app_errror');
|
||||
assert.equal(err.id, 'api.webhook.create_incoming.disabled.app_error');
|
||||
done();
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
it('updateIncomingHook', function(done) {
|
||||
TestHelper.initBasic(() => {
|
||||
TestHelper.basicClient().enableLogErrorsToConsole(false); // Disabling since this unit test causes an error
|
||||
|
||||
var hook = {};
|
||||
hook.channel_id = TestHelper.basicChannel().id;
|
||||
hook.description = 'desc';
|
||||
hook.display_name = 'Unit Test';
|
||||
|
||||
TestHelper.basicClient().updateIncomingHook(
|
||||
hook,
|
||||
function() {
|
||||
done(new Error('hooks not enabled'));
|
||||
},
|
||||
function(err) {
|
||||
assert.equal(err.id, 'api.webhook.update_incoming.disabled.app_error');
|
||||
done();
|
||||
}
|
||||
);
|
||||
@@ -38,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_errror');
|
||||
assert.equal(err.id, 'api.webhook.delete_incoming.disabled.app_error');
|
||||
done();
|
||||
}
|
||||
);
|
||||
@@ -128,5 +150,27 @@ describe('Client.Hooks', function() {
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
it('updateOutgoingHook', function(done) {
|
||||
TestHelper.initBasic(() => {
|
||||
TestHelper.basicClient().enableLogErrorsToConsole(false); // Disabling since this unit test causes an error
|
||||
|
||||
var hook = {};
|
||||
hook.channel_id = TestHelper.basicChannel().id;
|
||||
hook.description = 'desc';
|
||||
hook.display_name = 'Unit Test';
|
||||
|
||||
TestHelper.basicClient().updateOutgoingHook(
|
||||
hook,
|
||||
function() {
|
||||
done(new Error('hooks not enabled'));
|
||||
},
|
||||
function(err) {
|
||||
assert.equal(err.id, 'api.webhook.update_outgoing.disabled.app_error');
|
||||
done();
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user