aboutsummaryrefslogtreecommitdiff
path: root/test/runner.scm
blob: 5555dc2a10e65838b4682a1885cad9cb78d98f91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
;; Run with
;;
;;   guile -L  . --debug test/runner.scm

(define-module (test-runner)
  #:use-module (ice-9 match)
  #:use-module (srfi srfi-64)
  #:use-module (gn data species)
  )

(test-begin "runner")

(test-assert "species-meta is expected contain a link to tomato"
  (assoc "tomato" (cdr (assoc "links" (get-species-meta)))))

(test-assert "tomato-meta should have a document link"
   (assoc "doc" (get-expanded-taxon-meta "tomato")))

(test-equal "tomato-data should have a description"
  (assoc-ref (get-expanded-taxon-data "tomato") "description") "type of plant species with edible, often red, berry fruit")

(test-assert "mouse-meta should list all groups/populations/cohorts"
  (assoc "links" (get-expanded-taxon-meta "mouse")))

(test-end "runner")