parent
85940503a2
commit
651a2b7dcf
@ -0,0 +1,7 @@ |
||||
RocketChat.API.v1.addRoute('emoji-custom', { authRequired: true }, { |
||||
get() { |
||||
const emojis = Meteor.call('listEmojiCustom'); |
||||
|
||||
return RocketChat.API.v1.success({ emojis }); |
||||
} |
||||
}); |
||||
@ -0,0 +1,22 @@ |
||||
/* eslint-env mocha */ |
||||
/* globals expect */ |
||||
|
||||
import {getCredentials, api, request, credentials } from '../../data/api-data.js'; |
||||
|
||||
describe('[EmojiCustom]', function() { |
||||
this.retries(0); |
||||
|
||||
before(done => getCredentials(done)); |
||||
|
||||
describe('GET', () => { |
||||
it('[/emoji-custom]', (done) => { |
||||
request.get(api('emoji-custom')) |
||||
.set(credentials) |
||||
.expect(200) |
||||
.expect((res) => { |
||||
expect(res.body).to.have.property('emojis').and.to.be.a('array'); |
||||
}) |
||||
.end(done); |
||||
}); |
||||
}); |
||||
}); |
||||
Loading…
Reference in new issue