Skip to content

Commit a1386be

Browse files
authored
Merge pull request #86 from yetanalytics/allow-empty-statements
[LRS-83] Allow empty statement batches
2 parents 5869bf7 + 63614c7 commit a1386be

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

src/xapi_schema/spec.cljc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,7 +1327,7 @@
13271327
true)))))
13281328

13291329
(s/def ::statements
1330-
(s/coll-of ::statement :into [] :min-count 1))
1330+
(s/coll-of ::statement :into []))
13311331

13321332
(s/def ::lrs-statements
1333-
(s/coll-of ::lrs-statement :into [] :min-count 1))
1333+
(s/coll-of ::lrs-statement :into []))

test/xapi_schema/spec_test.cljc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,3 +626,14 @@
626626
"verb" {"id" "http://adlnet.gov/expapi/verbs/voided"
627627
"display" {"en-US" "voided"}}
628628
"object" {"id" "http://example.com/activities/1"}})))
629+
630+
(deftest statements-test
631+
(testing "generic statememt batch"
632+
(should-satisfy+ ::xs/statements
633+
[simple-statement]
634+
[simple-statement long-statement]
635+
[]))
636+
(testing "LRS retrieval statement batch"
637+
(should-satisfy+ ::xs/lrs-statements
638+
[d/statement] ; This statement has ID and other required fields
639+
[])))

0 commit comments

Comments
 (0)