mirror of
https://codeberg.org/icewind/ugc-scaper.git
synced 2026-06-04 02:34:11 +02:00
map history current season
This commit is contained in:
parent
7f85e52c71
commit
02ba1b2b9f
13 changed files with 19626 additions and 6 deletions
|
|
@ -1,8 +1,8 @@
|
|||
use insta::assert_json_snapshot;
|
||||
use std::fs::read_to_string;
|
||||
use ugc_scraper::parser::{
|
||||
MatchPageParser, Parser, PlayerDetailsParser, PlayerParser, SeasonsParser, TeamLookupParser,
|
||||
TeamMatchesParser, TeamParser, TeamRosterHistoryParser, TransactionParser,
|
||||
MapHistoryParser, MatchPageParser, Parser, PlayerDetailsParser, PlayerParser, SeasonsParser,
|
||||
TeamLookupParser, TeamMatchesParser, TeamParser, TeamRosterHistoryParser, TransactionParser,
|
||||
};
|
||||
|
||||
#[test]
|
||||
|
|
@ -108,3 +108,35 @@ fn test_parse_transaction_html() {
|
|||
let parsed = parser.parse(&body).unwrap();
|
||||
assert_json_snapshot!(parsed);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_maps_9_html() {
|
||||
let body = read_to_string("tests/data/map_9v9.html").unwrap();
|
||||
let parser = MapHistoryParser::new();
|
||||
let parsed = parser.parse(&body).unwrap();
|
||||
assert_json_snapshot!(parsed);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_maps_6_html() {
|
||||
let body = read_to_string("tests/data/map_6v6.html").unwrap();
|
||||
let parser = MapHistoryParser::new();
|
||||
let parsed = parser.parse(&body).unwrap();
|
||||
assert_json_snapshot!(parsed);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_maps_4_html() {
|
||||
let body = read_to_string("tests/data/map_4v4.html").unwrap();
|
||||
let parser = MapHistoryParser::new();
|
||||
let parsed = parser.parse(&body).unwrap();
|
||||
assert_json_snapshot!(parsed);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_maps_2_html() {
|
||||
let body = read_to_string("tests/data/map_2v2.html").unwrap();
|
||||
let parser = MapHistoryParser::new();
|
||||
let parsed = parser.parse(&body).unwrap();
|
||||
assert_json_snapshot!(parsed);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue