()
| 300 | |
| 301 | #[test] |
| 302 | fn no_orphans() { |
| 303 | let f = Fixtures::copy("simple"); |
| 304 | let repo_id = RepoId::wiki(); |
| 305 | let child = f.topic(repo_id, "00002"); |
| 306 | |
| 307 | let result = UpdateTopicParentTopics { |
| 308 | actor: actor(), |
| 309 | repo_id, |
| 310 | topic_id: child.topic_id(), |
| 311 | parent_topic_ids: &[], |
| 312 | } |
| 313 | .call(f.mutation(), &redis::Noop); |
| 314 | |
| 315 | assert!(matches!(result, Err(Error::Repo(_)))); |
| 316 | } |
| 317 | |
| 318 | #[test] |
| 319 | fn no_cycles() { |