Add tests for filters
This commit is contained in:
parent
7c1720cd4e
commit
cd91ba8bce
1 changed files with 17 additions and 0 deletions
17
test/rss_thread_watch/filter_test.clj
Normal file
17
test/rss_thread_watch/filter_test.clj
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
(ns rss-thread-watch.filter-test
|
||||||
|
(:require [clojure.test :refer :all]
|
||||||
|
[rss-thread-watch.filters :refer :all]))
|
||||||
|
|
||||||
|
(def thread {:title "This is a thread TiTle wItH some extRa text"
|
||||||
|
:no 928398237932
|
||||||
|
:chod 92})
|
||||||
|
|
||||||
|
|
||||||
|
(deftest filters
|
||||||
|
(testing "Case sensitive filter"
|
||||||
|
(is (case-sensitive-filter thread ["TiTle"]))
|
||||||
|
(is (= (case-sensitive-filter thread ["TITLE"]) nil)))
|
||||||
|
(testing "Case insensitive filter"
|
||||||
|
(is (case-insensitive-filter thread ["TiTle"]))
|
||||||
|
(is (case-insensitive-filter thread ["with"]))))
|
||||||
|
|
Loading…
Reference in a new issue