-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #207 from StackStorm/remove-hipchat
Remove HipChat adapter
- Loading branch information
Showing
5 changed files
with
6 additions
and
296 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "hubot-stackstorm", | ||
"description": "A hubot plugin for integrating with StackStorm event-driven infrastructure automation platform.", | ||
"version": "0.10.4", | ||
"version": "0.11.0", | ||
"author": "StackStorm, Inc. <[email protected]>", | ||
"license": "Apache-2.0", | ||
"keywords": [ | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -227,67 +227,6 @@ describe('MSTeamsFormatter', function() { | |
}); | ||
}); | ||
|
||
describe('HipChatFormatter', function() { | ||
var adapterName = 'hipchat'; | ||
var robot = new DummyRobot('dummy', null, false); | ||
|
||
it('should echo back for non-empty', function() { | ||
var adapter = adapters.getAdapter(adapterName, robot); | ||
var o = adapter.formatData('DATA'); | ||
expect(o).to.be.an('string'); | ||
expect(o).to.equal('/code DATA'); | ||
}); | ||
|
||
it('should be an empty string for empty', function() { | ||
var adapter = adapters.getAdapter(adapterName, robot); | ||
var o = adapter.formatData(''); | ||
expect(o).to.be.an('string'); | ||
expect(o).to.equal(''); | ||
}); | ||
|
||
it('should correctly format recipient', function() { | ||
var adapter = adapters.getAdapter(adapterName, robot); | ||
env.HUBOT_HIPCHAT_JID = '[email protected]'; | ||
var o = adapter.formatRecipient('Estee'); | ||
expect(o).to.be.an('string'); | ||
expect(o).to.equal('[email protected]'); | ||
}); | ||
|
||
it('should correctly format recipient with conf.btf.hipchat.com', function() { | ||
var adapter = adapters.getAdapter(adapterName, robot); | ||
env.HUBOT_HIPCHAT_JID = '[email protected]'; | ||
env.HUBOT_HIPCHAT_XMPP_DOMAIN = "btf.hipchat.com"; | ||
var o = adapter.formatRecipient('Estee'); | ||
expect(o).to.be.an('string'); | ||
expect(o).to.equal('[email protected]'); | ||
}); | ||
|
||
it('should normalize command', function() { | ||
var adapter = adapters.getAdapter(adapterName, robot); | ||
var o = adapter.normalizeCommand('run local "uname -a"'); | ||
expect(o).to.be.an('string'); | ||
expect(o).to.equal('run local "uname -a"'); | ||
}); | ||
|
||
it('should normalize the addressee', function() { | ||
var adapter = adapters.getAdapter(adapterName, robot); | ||
// HipChat packages the room and user name differently | ||
var msg = { | ||
message: { | ||
user: { | ||
jid: "HipChatRoomName", | ||
mention_name: "HipChatUserName" | ||
} | ||
} | ||
}; | ||
var o = adapter.normalizeAddressee(msg); | ||
expect(o.name).to.be.an('string'); | ||
expect(o.name).to.equal('HipChatUserName'); | ||
expect(o.room).to.be.an('string'); | ||
expect(o.room).to.equal('HipChatRoomName'); | ||
}); | ||
}); | ||
|
||
describe('RocketChatFormatter', function() { | ||
var adapterName = 'rocketchat'; | ||
var robot = new DummyRobot('dummy', null, false); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters