| 39 | |
| 40 | #[test] |
| 41 | fn activity_log_updated() { |
| 42 | let f = Fixtures::copy("simple"); |
| 43 | |
| 44 | let repo_id = RepoId::wiki(); |
| 45 | let link = link(&f, "Page title", "00001"); |
| 46 | let link_id = link.id(); |
| 47 | |
| 48 | let activity = f.git.fetch_activity(repo_id, link_id, 1).unwrap(); |
| 49 | |
| 50 | assert!(!activity.is_empty()); |
| 51 | |
| 52 | DeleteLink { |
| 53 | actor: actor(), |
| 54 | repo_id, |
| 55 | link_id: link_id.clone(), |
| 56 | } |
| 57 | .call(f.mutation(), &redis::Noop) |
| 58 | .unwrap(); |
| 59 | |
| 60 | let activity = f.git.fetch_activity(repo_id, link_id, 100).unwrap(); |
| 61 | let mut found = false; |
| 62 | |
| 63 | for change in activity { |
| 64 | if let activity::Change::UpsertLink(activity::UpsertLink { upserted_link, .. }) = change |
| 65 | { |
| 66 | if &upserted_link.id == link_id { |
| 67 | assert!(upserted_link.deleted); |
| 68 | found = true; |
| 69 | } |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | assert!(found); |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | mod update_link_parent_topics { |