| 15 | |
| 16 | #[test] |
| 17 | fn returns_matches() { |
| 18 | let f = Fixtures::copy("simple"); |
| 19 | |
| 20 | let FetchTopicLiveSearchResult { |
| 21 | synonyms: matches, .. |
| 22 | } = FetchTopicLiveSearch { |
| 23 | limit: 10, |
| 24 | repos: RepoIds::from(vec![RepoId::wiki()]), |
| 25 | search: Search::parse("existing non-root topic").unwrap(), |
| 26 | viewer: actor(), |
| 27 | } |
| 28 | .call(&f.git) |
| 29 | .unwrap(); |
| 30 | |
| 31 | assert_eq!( |
| 32 | matches.iter().next().unwrap(), |
| 33 | &SynonymEntry { |
| 34 | name: "Existing non-root topic".to_owned(), |
| 35 | id: parse_id("00002"), |
| 36 | } |
| 37 | ); |
| 38 | } |
| 39 | |
| 40 | #[test] |
| 41 | fn indexing_works() { |