Skip to content

Commit

Permalink
feat: add past-members to schema and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Macroz committed Apr 10, 2019
1 parent 001cd9c commit 65d4f64
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/clj/rems/api/schema.clj
Expand Up @@ -135,6 +135,8 @@
:application/applicant-attributes {s/Keyword s/Str}
:application/members #{{:userid s/Str
s/Keyword s/Str}}
:application/past-members #{{:userid s/Str
s/Keyword s/Str}}
:application/invited-members #{{:name s/Str
:email s/Str}}
:application/resources [V2Resource]
Expand Down
4 changes: 3 additions & 1 deletion test/clj/rems/application/test_model.clj
Expand Up @@ -152,6 +152,7 @@
:mail "applicant@example.com"
:commonName "Applicant"}
:application/members #{}
:application/past-members #{}
:application/invitation-tokens {}
:application/resources [{:catalogue-item/id 10
:resource/id 11
Expand Down Expand Up @@ -526,7 +527,8 @@
expected-application (merge expected-application
{:application/last-activity (DateTime. 5000)
:application/events events
:application/members #{}})]
:application/members #{}
:application/past-members #{{:userid "member"}}})]
(is (= expected-application (apply-events events))))))))))))))))

(deftest test-calculate-permissions
Expand Down

0 comments on commit 65d4f64

Please sign in to comment.