-
Notifications
You must be signed in to change notification settings - Fork 39
robot.http has no effect in tests #19
Copy link
Copy link
Closed
Description
It looks like there is an issue with robot.http when using hubot-test-helper. The following script works fine with a Hubot shell but the associated test does not seem to trigger any HTTP request.
Script:
module.exports = (robot) ->
robot.hear /(http(?:s?):\/\/(\S*))/i, (res) ->
url = res.match[1]
res.send "ok1: #{url}"
robot.http(url).get() (err, response, body) ->
res.send "ok2: #{url}"Test:
context "user posts link", ->
beforeEach ->
room.user.say 'user1', 'http://google.com'
it 'hubot posts details about the link', ->
expect(room.messages).to.eql [
['user1', 'http://google.com']
['hubot', 'ok1: http://google.com']
['hubot', 'ok2: http://google.com']
]Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels