(repo_1: RepoId, repo_2: RepoId, name: &str)
| 682 | } |
| 683 | |
| 684 | fn upsert_topic(repo_1: RepoId, repo_2: RepoId, name: &str) -> Result<UpsertTopicResult> { |
| 685 | let f = Fixtures::copy("simple"); |
| 686 | let topic_id = parse_id("00001"); |
| 687 | |
| 688 | let result = f |
| 689 | .upsert_topic(repo_1, name, &topic_id, OnMatchingSynonym::Ask) |
| 690 | .unwrap(); |
| 691 | assert!(result.saved); |
| 692 | let parent_topic = result.repo_topic.unwrap(); |
| 693 | let parent_id = parent_topic.topic_id(); |
| 694 | |
| 695 | let topic_path = parse_id("00002"); |
| 696 | |
| 697 | f.upsert_topic( |
| 698 | repo_2, |
| 699 | name, |
| 700 | &topic_path, |
| 701 | OnMatchingSynonym::Update(parent_id.to_owned()), |
| 702 | ) |
| 703 | } |
| 704 | |
| 705 | fn assert_update_works(repo_1: RepoId, repo_2: RepoId, expected_parent_topics: &[&str]) { |
| 706 | let result = upsert_topic(repo_1, repo_2, "Topic name").unwrap(); |
no test coverage detected