()
| 123 | |
| 124 | #[test] |
| 125 | fn cannot_delete_root_topic() { |
| 126 | let f = Fixtures::copy("simple"); |
| 127 | let repo_id = RepoId::wiki(); |
| 128 | let root = ExternalId::root_topic(); |
| 129 | let topic = f.git.fetch_topic(repo_id, &root).unwrap(); |
| 130 | assert!(topic.root()); |
| 131 | |
| 132 | let result = DeleteTopic { |
| 133 | actor: actor(), |
| 134 | repo_id, |
| 135 | topic_id: topic.topic_id().to_owned(), |
| 136 | } |
| 137 | .call(f.mutation(), &redis::Noop); |
| 138 | |
| 139 | assert!(matches!(result, Err(Error::Repo(_)))); |
| 140 | let topic = f.git.fetch_topic(repo_id, &root).unwrap(); |
| 141 | assert!(topic.root()); |
| 142 | } |
| 143 | |
| 144 | fn make_topic(f: &Fixtures, parent: &ExternalId, name: &str) -> RepoTopic { |
| 145 | let topic_id = parse_id("dPqrU4sZaPkNZEDyr9T68G4RJYV8bncmIXumedBNls9F994v8poSbxTo7dKK3Vhi"); |
nothing calls this directly
no test coverage detected