Commit c38861e8 authored by Leonardo Schwarz's avatar Leonardo Schwarz

test disambiguation

parent dca00551
{"request":{"url":"https://musicbrainz.org/ws/2/release/9642c552-a5b3-4b7e-9168-aeb2a1a06f27?inc=aliases+annotation+artists+labels+recordings","method":"GET","body":null,"headers":{"User-Agent":"MusicBrainz-Rust/Testing"}},"response":{"url":"https://musicbrainz.org/ws/2/release/9642c552-a5b3-4b7e-9168-aeb2a1a06f27?inc=aliases+annotation+artists+labels+recordings","status":200,"headers":{"Access-Control-Allow-Origin":"*","Connection":"keep-alive","Content-Type":"application/xml; charset=utf-8","Date":"Sat, 26 Aug 2017 08:25:31 GMT","ETag":"W/\"448751a85b4effc12cd417c67987fd45\"","Keep-Alive":"timeout=15","Server":"Plack::Handler::Starlet","Transfer-Encoding":"chunked","Vary":"Accept-Encoding","X-RateLimit-Limit":"1200","X-RateLimit-Remaining":"1039","X-RateLimit-Reset":"1503735932"},"body":"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48bWV0YWRhdGEgeG1sbnM9Imh0dHA6Ly9tdXNpY2JyYWluei5vcmcvbnMvbW1kLTIuMCMiPjxyZWxlYXNlIGlkPSI5NjQyYzU1Mi1hNWIzLTRiN2UtOTE2OC1hZWIyYTFhMDZmMjciPjx0aXRsZT5DQVBTIExPQ0s8L3RpdGxlPjxzdGF0dXMgaWQ9IjRlMzA0MzE2LTM4NmQtMzQwOS1hZjJlLTc4ODU3ZWVjNWNmZSI+T2ZmaWNpYWw8L3N0YXR1cz48cXVhbGl0eT5ub3JtYWw8L3F1YWxpdHk+PGRpc2FtYmlndWF0aW9uPumAmuW4uOebpDwvZGlzYW1iaWd1YXRpb24+PHRleHQtcmVwcmVzZW50YXRpb24+PGxhbmd1YWdlPmVuZzwvbGFuZ3VhZ2U+PHNjcmlwdD5MYXRuPC9zY3JpcHQ+PC90ZXh0LXJlcHJlc2VudGF0aW9uPjxhcnRpc3QtY3JlZGl0PjxuYW1lLWNyZWRpd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iLWFmYWUtNGI0Mi05MDdkLWM1YzIxNWRjOGQ4OSI+PHRpdGxlPlNQQUNFPC90aXRsZT48bGVuZ3RoPjI4MjAwMDwvbGVuZ3RoPjwvcmVjb3JkaW5nPjwvdHJhY2s+PHRyYWNrIGlkPSJiMTFjNzYzMC03MDRhLTRkNTktOWMzYy0yN2ZmMzAwMGQ4N2UiPjxwb3NpdGlvbj44PC9wb3NpdGlvbj48bnVtYmVyPjg8L251bWJlcj48bGVuZ3RoPjMxNjAwMDwvbGVuZ3RoPjxyZWNvcmRpbmcgaWQ9IjVkZjBhOWY4LTNkMjItNGU0MS1iMjFjLTkyYTExZGJhNDIxYSI+PHRpdGxlPlJFVFVSTjwvdGl0bGU+PGxlbmd0aD4zMTYwMDA8L2xlbmd0aD48L3JlY29yZGluZz48L3RyYWNrPjwvdHJhY2stbGlzdD48L21lZGl1bT48L21lZGl1bS1saXN0PjwvcmVsZWFzZT48L21ldGFkYXRhPg=="},"format_version":3}
\ No newline at end of file
......@@ -283,11 +283,19 @@ mod tests {
assert_eq!(release.status, Some(ReleaseStatus::Official));
assert_eq!(release.language, Some(Language::from_639_3("eng").unwrap()));
assert_eq!(release.script, Some("Latn".to_string()));
// TODO: check disambiguation
// assert_eq!(release.disambiguation,
assert_eq!(release.disambiguation, None);
assert_eq!(release.mediums.len(), 1);
}
#[test]
fn disambiguation()
{
let mbid = Mbid::from_str("9642c552-a5b3-4b7e-9168-aeb2a1a06f27").unwrap();
let release: Release = ::util::test_utils::fetch_entity(&mbid).unwrap();
assert_eq!(release.disambiguation, Some("通常盤".to_string()));
}
#[test]
fn release_read_xml2()
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment