Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LRS-82 Allow empty contextActivities map #82

Merged
merged 1 commit into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/xapi_schema/spec.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -944,10 +944,10 @@
(s/def :context/contextActivities
(conform-ns "contextActivities"
(s/and
(s/keys :req [(or :contextActivities/parent
:contextActivities/grouping
:contextActivities/category
:contextActivities/other)])
(s/keys :opt [:contextActivities/parent
:contextActivities/grouping
:contextActivities/category
:contextActivities/other])
(restrict-keys :contextActivities/parent
:contextActivities/grouping
:contextActivities/category
Expand Down
4 changes: 2 additions & 2 deletions test/xapi_schema/spec_test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,8 @@
["foo"])))

(deftest context-activities-map-test
(testing "cannot be empty"
(should-not-satisfy ::xs/context-activities {})))
(testing "can be empty"
(should-satisfy :context/contextActivities {})))

(deftest context-test
(testing "can be empty"
Expand Down