UNPKG

hubot-xmatters

Version:

A hubot script to send events to xMatters and listen for callbacks.

20 lines (14 loc) 438 B
chai = require 'chai' sinon = require 'sinon' chai.use require 'sinon-chai' expect = chai.expect describe 'xmatters', -> beforeEach -> @robot = respond: sinon.spy() hear: sinon.spy() require('../src/xmatters')(@robot) it 'registers a respond listener', -> expect(@robot.respond).to.have.been.calledWith(/hello/) it 'registers a hear listener', -> expect(@robot.hear).to.have.been.calledWith(/orly/)