fendersperth / fendersbot

A group project for learning and teaching via a real code base
9 stars 3 forks source link

Testing slack integrations #27

Closed karlbright closed 8 years ago

karlbright commented 8 years ago

We need some basic functionality around testing slack integrations such as responses, slash commands etc. We shouldn't need to rely on starting a bot and checking each command manually.

Some quick ideas in my mind here and very high level process on how this might go for:

Because Botkit handled sending our messages etc to Slack, we don't need to test that. All we care about is testing that we get the expected response from our callback functions, check that bot.replyPublic was called with the correct value etc.

luke-john commented 8 years ago

We can probably test the callbacks without the bot.

All the other parts are framework features and should be covered by Botkits tests

karlbright commented 8 years ago

I think we should still be testing that the bot methods we expect to be called are called with the correct arguments. But this of course can be stubbed.

luke-john commented 8 years ago

Sure, that makes sense.

Did you want to add tests as part of #23, or merge and convert to es6 first?

karlbright commented 8 years ago

I've added tests to #29 which gives us a good starting point.

karlbright commented 8 years ago

Closing as this has been used for #29 and merged. We will need to do some more work on this for slash commands and i've already got some ideas on how to handle things like Meetup and LastFM integrations with ease.