Skip to content

Commit

Permalink
Use friendlier prompt when the date cannot be parsed
Browse files Browse the repository at this point in the history
  • Loading branch information
mnvr committed Feb 15, 2015
1 parent 72a1026 commit 8ad32b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/remind-her.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ module.exports = (robot) ->
date = parse text

if date == false
msg.send "can't parse #{text}"
msg.send "I did not understand the date in '#{text}'"
return

reminder = new ReminderAt msg.envelope, date, action
Expand Down
2 changes: 1 addition & 1 deletion test/remind-her.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe 'Reminder Strings', ->

it 'that do not specify a date are ignored', ->
room.user.say 'user', 'hubot remind me at not a date to do task'
assert.match room.lastMessage(), /can't parse/
assert.match room.lastMessage(), /I did not understand the date/

it 'can be absolute chrono formats specified with "at"', ->
room.user.say 'user', 'hubot remind me at Saturday, 17 August 2513 to do task'
Expand Down

0 comments on commit 8ad32b0

Please sign in to comment.