Skip to content

Commit

Permalink
Check explicitly for error message (use-ink#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Müller authored Nov 30, 2020
1 parent 3967026 commit cade40d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/cmd/new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,10 @@ mod tests {
fn rejects_hyphenated_name() {
with_tmp_dir(|path| {
let result = cmd::new::execute("rejects-hyphenated-name", Some(path));
assert!(result.is_err(), "Should fail");
assert_eq!(
format!("{:?}", result),
r#"Err(Contract names cannot contain hyphens)"#
result.err().unwrap().to_string(),
"Contract names cannot contain hyphens"
);
Ok(())
})
Expand Down

0 comments on commit cade40d

Please sign in to comment.