()
| 779 | |
| 780 | #[test] |
| 781 | fn parent_topic_updated() { |
| 782 | let f = Fixtures::copy("simple"); |
| 783 | let repo_id = RepoId::wiki(); |
| 784 | let path = parse_id("00001"); |
| 785 | let parent = f.topic(repo_id, "00001"); |
| 786 | assert_eq!(parent.children, BTreeSet::new()); |
| 787 | |
| 788 | let result = f |
| 789 | .upsert_topic(repo_id, "Topic name", &path, OnMatchingSynonym::Ask) |
| 790 | .unwrap(); |
| 791 | assert!(result.saved); |
| 792 | let child = result.repo_topic.unwrap(); |
| 793 | let child_id = &child.topic_id(); |
| 794 | |
| 795 | let parent = f.topic(repo_id, "00001"); |
| 796 | let children = parent |
| 797 | .children |
| 798 | .iter() |
| 799 | .map(|child| child.id.to_string()) |
| 800 | .collect::<Vec<String>>(); |
| 801 | |
| 802 | assert_eq!(children, vec![child_id.to_string()]); |
| 803 | } |
| 804 | |
| 805 | #[test] |
| 806 | fn no_cycles() { |
nothing calls this directly
no test coverage detected