handling invalid spec jsons properly, additional tests, closes #1840

This commit is contained in:
debris
2016-09-05 17:41:34 +02:00
parent 4e466f09db
commit aa8b871e49
6 changed files with 41 additions and 28 deletions

View File

@@ -187,7 +187,10 @@ mod tests {
use spec::Spec;
/// Create a new test chain spec with `BasicAuthority` consensus engine.
fn new_test_authority() -> Spec { Spec::load(include_bytes!("../../res/test_authority.json")) }
fn new_test_authority() -> Spec {
let bytes: &[u8] = include_bytes!("../../res/test_authority.json");
Spec::load(bytes).expect("invalid chain spec")
}
#[test]
fn has_valid_metadata() {