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

Function action_requested

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

Source from the content-addressed store, hash-verified

652
653 #[test]
654 fn action_requested() {
655 let f = Fixtures::copy("simple");
656 let repo_id = RepoId::wiki();
657 let parent_topic_1 = parse_id("00001");
658 let parent_topic_2 = parse_id("00002");
659
660 let result = f
661 .upsert_topic(
662 repo_id,
663 "Topic name",
664 &parent_topic_1,
665 OnMatchingSynonym::Ask,
666 )
667 .unwrap();
668 assert!(result.saved);
669
670 let result = f
671 .upsert_topic(
672 repo_id,
673 "Topic name",
674 &parent_topic_2,
675 OnMatchingSynonym::Ask,
676 )
677 .unwrap();
678
679 assert!(result.repo_topic.is_none());
680 assert!(!result.saved);
681 assert!(!result.matching_repo_topics.is_empty());
682 }
683
684 fn upsert_topic(repo_1: RepoId, repo_2: RepoId, name: &str) -> Result<UpsertTopicResult> {
685 let f = Fixtures::copy("simple");

Callers

nothing calls this directly

Calls 2

parse_idFunction · 0.85
upsert_topicMethod · 0.45

Tested by

no test coverage detected