()
| 231 | |
| 232 | #[test] |
| 233 | fn add_grant_request_user_relation_read() { |
| 234 | let req = AddGrantRequest { |
| 235 | subject_type: GrantSubjectType::User, |
| 236 | subject_id: Uuid::nil(), |
| 237 | relation: GrantRelation::Read, |
| 238 | }; |
| 239 | let json = serde_json::to_string(&req).unwrap(); |
| 240 | assert!(json.contains("\"subject_type\":\"user\""), "got: {json}"); |
| 241 | assert!(json.contains("\"relation\":\"read\""), "got: {json}"); |
| 242 | } |
| 243 | |
| 244 | #[test] |
| 245 | fn mutation_subject_rejects_everyone() { |