add test & fix spec issue

This commit is contained in:
jem 2020-06-17 18:23:27 +02:00
parent 9850b9cf1e
commit 3dd7083d7b
2 changed files with 12 additions and 1 deletions

View file

@ -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?

View 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"]]}
)))