Added traffic map support #44

Closed
wants to merge 2 commits into
from
Jump to file or symbol
Failed to load files and symbols.
+27 −0
Split
View
@@ -19,6 +19,7 @@ require("./scripts/set-get")(bot)
require("./scripts/vreme")(bot)
require("./scripts/apt")(bot)
require("./scripts/url")(bot)
+require("./scripts/promet")(bot)
bot.command /^.(pomo[čc]|help)$/i, (r) ->
msg = bot.help.join "\n"
View
@@ -0,0 +1,6 @@
+module.exports = (bot) ->
+
+ bot.command /^\.promet/i,
+ ".promet Izpiše povezavo do zemljevida prometnih razmer"
+ (r) ->
+ r.reply "Razmere v prometu: http://www.promet.si/portal/map/portal.aspx"
View
@@ -0,0 +1,20 @@
+chai = require 'chai'
+should = chai.should()
+expect = chai.expect
+
+fat = require '../lib/fat_tests'
+
+describe 'promet.coffee', ->
+ this.timeout 16000
+ bot = require("../scripts/promet")(new fat.BotTest())
+ # generic test
+ it 'should display help', (done)->
+ bot.help.should.be.an 'array'
+ expect(bot.help.length).to.be.at.least 2
+ done()
+
+ it 'test .promet', (done)->
+ bot.test ".promet", (msg)->
+ expect(msg).to.be.a('string')
+ expect(msg.length).to.be.at.least 40
+ done()