Commit 6021e215 authored by Leonardo Schwarz's avatar Leonardo Schwarz

Fix test after error-chain update.

parent 6034393a
......@@ -47,14 +47,7 @@ mod tests {
assert_eq!(err.description(), "MusicBrainz server error");
// If backtraces are enabled `error-chain` will appends some backtrace
// information to the end of the display string.
if ::std::env::var("RUST_BACKTRACE").unwrap_or_else(|_| "".to_string()).as_str() == "1" {
assert!(err.display().to_string().starts_with("Error: MusicBrainz server error: Your requests are exceeding the allowable rate limit. Please see http://wiki.musicbrainz.org/XMLWebService for more information.\nFor usage, please see: http://musicbrainz.org/development/mmd\n"));
} else {
assert_eq!(err.display().to_string(), "Error: MusicBrainz server error: Your requests are exceeding the allowable rate limit. Please see http://wiki.musicbrainz.org/XMLWebService for more information.\nFor usage, please see: http://musicbrainz.org/development/mmd\n".to_string());
}
assert!(format!("{}", err).starts_with("MusicBrainz server error: Your requests are exceeding the allowable rate limit. Please see http://wiki.musicbrainz.org/XMLWebService for more information.\nFor usage, please see: http://musicbrainz.org/development/mmd"));
}
#[test]
......
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