slack.test.js 633 B

12345678910111213141516171819202122
  1. const chai = require('chai')
  2. , expect = chai.expect
  3. , sinon = require('sinon')
  4. , sinonChai = require('sinon-chai')
  5. , utils = require('../utils.js')
  6. ;
  7. chai.use(sinonChai);
  8. describe('Slack Util', function () {
  9. const helpers = require('@commons/util/helpers');
  10. const Crowi = require('@server/crowi');
  11. const crowi = new Crowi(helpers.root(), process.env);
  12. const slack = require(crowi.libDir + '/util/slack')(crowi);
  13. it('post comment method exists', function() {
  14. expect(slack).to.respondTo('postComment');
  15. });
  16. it('post page method exists', function() {
  17. expect(slack).to.respondTo('postPage');
  18. });
  19. });