mirror of
https://codeberg.org/icewind/ugc-scaper.git
synced 2026-06-03 18:24:10 +02:00
add transactions
This commit is contained in:
parent
0cada6847a
commit
bd2cd8afe6
9 changed files with 2907 additions and 32 deletions
|
|
@ -2,7 +2,7 @@ use insta::assert_json_snapshot;
|
|||
use std::fs::read_to_string;
|
||||
use ugc_scraper::parser::{
|
||||
MatchPageParser, Parser, PlayerDetailsParser, PlayerParser, SeasonsParser, TeamLookupParser,
|
||||
TeamMatchesParser, TeamParser, TeamRosterHistoryParser,
|
||||
TeamMatchesParser, TeamParser, TeamRosterHistoryParser, TransactionParser,
|
||||
};
|
||||
|
||||
#[test]
|
||||
|
|
@ -100,3 +100,11 @@ fn test_parse_match_html() {
|
|||
let parsed = parser.parse(&body).unwrap();
|
||||
assert_json_snapshot!(parsed);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_transaction_html() {
|
||||
let body = read_to_string("tests/data/transactions_4v4.html").unwrap();
|
||||
let parser = TransactionParser::new();
|
||||
let parsed = parser.parse(&body).unwrap();
|
||||
assert_json_snapshot!(parsed);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue