add test & fix spec issue
This commit is contained in:
parent
9850b9cf1e
commit
3dd7083d7b
2 changed files with 12 additions and 1 deletions
|
@ -8,7 +8,7 @@
|
|||
))
|
||||
|
||||
(s/def ::feed (s/cat :name string? :url string?))
|
||||
(s/def ::feeds (s/* ::feed))
|
||||
(s/def ::feeds (s/coll-of ::feed))
|
||||
(def rss-source? (s/keys :req-un [::feeds]))
|
||||
|
||||
(defn-spec rss-client any?
|
||||
|
|
11
src/test/mastodon_bot/rss_api_test.cljs
Executable file
11
src/test/mastodon_bot/rss_api_test.cljs
Executable file
|
@ -0,0 +1,11 @@
|
|||
(ns mastodon-bot.rss-api-test
|
||||
(:require
|
||||
[cljs.test :refer-macros [deftest is testing run-tests]]
|
||||
[clojure.spec.alpha :as s]
|
||||
[mastodon-bot.rss-api :as sut]
|
||||
))
|
||||
|
||||
(deftest test-spec
|
||||
(is (s/valid? sut/rss-source?
|
||||
{:feeds [["correctiv-blog" "https://news.correctiv.org/news/rss.php"]]}
|
||||
)))
|
Reference in a new issue