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

Function lookup_indexes_updated

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

Source from the content-addressed store, hash-verified

479
480 #[test]
481 fn lookup_indexes_updated() {
482 let f = Fixtures::copy("simple");
483 let repo_id = RepoId::wiki();
484 let topic_id = parse_id("00001");
485 let search = Search::parse("topicA").unwrap();
486 let entry = SearchEntry {
487 id: topic_id.to_owned(),
488 kind: Kind::Topic,
489 };
490 assert!(!f.git.appears_in(repo_id, &search, &entry).unwrap());
491
492 UpdateTopicSynonyms {
493 actor: actor(),
494 repo_id,
495 topic_id: topic_id.clone(),
496 synonyms: vec![synonym("topicA")],
497 }
498 .call(f.mutation(), &redis::Noop)
499 .unwrap();
500
501 assert!(f.git.appears_in(repo_id, &search, &entry).unwrap());
502
503 UpdateTopicSynonyms {
504 actor: actor(),
505 repo_id,
506 topic_id,
507 synonyms: vec![synonym("topicB")],
508 }
509 .call(f.mutation(), &redis::Noop)
510 .unwrap();
511
512 assert!(!f.git.appears_in(repo_id, &search, &entry).unwrap());
513 }
514
515 #[test]
516 fn synonym_added_when_details_are_blank() {

Callers

nothing calls this directly

Calls 5

parse_idFunction · 0.85
parseFunction · 0.85
actorFunction · 0.85
callMethod · 0.45
mutationMethod · 0.45

Tested by

no test coverage detected