()
| 209 | |
| 210 | #[test] |
| 211 | fn timerange_deleted() { |
| 212 | let f = Fixtures::copy("simple"); |
| 213 | let repo_id = RepoId::wiki(); |
| 214 | let topic_id = parse_id("00001"); |
| 215 | |
| 216 | UpsertTopicTimerange { |
| 217 | actor: actor(), |
| 218 | repo_id, |
| 219 | timerange: Timerange { |
| 220 | prefix_format: TimerangePrefixFormat::StartYearMonth, |
| 221 | starts: Geotime::now().into(), |
| 222 | }, |
| 223 | topic_id: topic_id.to_owned(), |
| 224 | } |
| 225 | .call(f.mutation(), &redis::Noop) |
| 226 | .unwrap(); |
| 227 | |
| 228 | let topic = f.git.fetch_topic(repo_id, &topic_id).unwrap(); |
| 229 | assert!(topic.timerange().is_some()); |
| 230 | |
| 231 | RemoveTopicTimerange { |
| 232 | actor: actor(), |
| 233 | repo_id, |
| 234 | topic_id: topic_id.to_owned(), |
| 235 | } |
| 236 | .call(f.mutation(), &redis::Noop) |
| 237 | .unwrap(); |
| 238 | |
| 239 | let topic = f.git.fetch_topic(repo_id, &topic_id).unwrap(); |
| 240 | assert!(topic.timerange().is_none()); |
| 241 | } |
| 242 | } |
| 243 | |
| 244 | #[cfg(test)] |
nothing calls this directly
no test coverage detected