MCPcopy Create free account
hub / github.com/emwalker/digraph / change_entries_updated

Function change_entries_updated

backend/tests/git/topic.rs:162–201  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

160
161 #[test]
162 fn change_entries_updated() {
163 let f = Fixtures::copy("simple");
164 let repo_id = RepoId::wiki();
165 let root = ExternalId::root_topic();
166
167 let climate_change = make_topic(&f, &root, "Topic name");
168 let activity = f
169 .git
170 .fetch_activity(repo_id, climate_change.topic_id(), 1)
171 .unwrap();
172 assert!(!activity.is_empty());
173
174 DeleteTopic {
175 actor: actor(),
176 repo_id,
177 topic_id: climate_change.topic_id().to_owned(),
178 }
179 .call(f.mutation(), &redis::Noop)
180 .unwrap();
181
182 let activity = f
183 .git
184 .fetch_activity(repo_id, climate_change.topic_id(), 100)
185 .unwrap();
186
187 let mut found = false;
188
189 for change in activity {
190 if let activity::Change::UpsertTopic(activity::UpsertTopic { upserted_topic, .. }) =
191 change
192 {
193 if &upserted_topic.id == climate_change.topic_id() {
194 assert!(upserted_topic.deleted);
195 found = true;
196 }
197 }
198 }
199
200 assert!(found);
201 }
202}
203
204#[cfg(test)]

Callers

nothing calls this directly

Calls 6

make_topicFunction · 0.85
actorFunction · 0.85
fetch_activityMethod · 0.45
topic_idMethod · 0.45
callMethod · 0.45
mutationMethod · 0.45

Tested by

no test coverage detected