Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

Commit

Permalink
Fixing issue with command test - should have just been a list of user-id
Browse files Browse the repository at this point in the history
  • Loading branch information
Chauncey committed Jun 17, 2013
1 parent cdd1a9c commit 69b1d2e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main/clojure/jarvis/command.clj
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
(message "tags")
(filter #(.startsWith % ":user:"))
(map #(user->id %)))
(list (str (get-user-id-from-message message)))))
(list (get-user-id-from-message message))))

(defn- user->id [user]
(re-find #"\d+" user))
(re-find #"\d+" user))
4 changes: 2 additions & 2 deletions src/test/clojure/jarvis/command_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
(deftest get-user-ids-from-tags
(is (= (list "29988" "1234" "35899")
(command/get-user-ids-from-tags (test-util/tagged-message))))
(is (= (list "29983")
(is (= (list :29983)
(command/get-user-ids-from-tags (test-util/message "~~help")))))

(deftest get-user-id-from-message
Expand Down Expand Up @@ -61,4 +61,4 @@
(is (= false
(command/private-message? (test-util/flow-add-message))))
(is (= false
(command/private-message? (test-util/flow-user-typing-message)))))
(command/private-message? (test-util/flow-user-typing-message)))))

0 comments on commit 69b1d2e

Please sign in to comment.