diff --git a/test/rss_thread_watch/filter_test.clj b/test/rss_thread_watch/filter_test.clj new file mode 100644 index 0000000..3924c35 --- /dev/null +++ b/test/rss_thread_watch/filter_test.clj @@ -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"])))) +