Update version strings in tests

This commit is contained in:
Matthias Beyer 2017-12-25 19:15:16 +01:00
parent 3c8dd19d11
commit 7d67b67440
3 changed files with 12 additions and 12 deletions

View File

@ -114,7 +114,7 @@ mod test {
let loca = StoreId::new_baseless(path).unwrap(); let loca = StoreId::new_baseless(path).unwrap();
let file = Entry::from_str(loca.clone(), r#"--- let file = Entry::from_str(loca.clone(), r#"---
[imag] [imag]
version = "0.5.0" version = "0.6.0"
--- ---
Hello World"#).unwrap(); Hello World"#).unwrap();

View File

@ -164,7 +164,7 @@ mod test {
#[test] #[test]
fn test_empty_json_to_fs() { fn test_empty_json_to_fs() {
let json = r#"{"version":"0.5.0","store":{}}"#; let json = r#"{"version":"0.6.0","store":{}}"#;
let mut json = Cursor::new(String::from(json).into_bytes()); let mut json = Cursor::new(String::from(json).into_bytes());
let mapper = JsonMapper::new(); let mapper = JsonMapper::new();
let mut hm = HashMap::new(); let mut hm = HashMap::new();
@ -177,12 +177,12 @@ mod test {
#[test] #[test]
fn test_json_to_fs() { fn test_json_to_fs() {
let json = r#" let json = r#"
{ "version": "0.5.0", { "version": "0.6.0",
"store": { "store": {
"example": { "example": {
"header": { "header": {
"imag": { "imag": {
"version": "0.5.0" "version": "0.6.0"
} }
}, },
"content": "test" "content": "test"
@ -209,7 +209,7 @@ mod test {
let mut hm = HashMap::new(); let mut hm = HashMap::new();
let content = r#"--- let content = r#"---
[imag] [imag]
version = "0.5.0" version = "0.6.0"
--- ---
hi there!"#; hi there!"#;
@ -224,12 +224,12 @@ hi there!"#;
let example = r#" let example = r#"
{ {
"version": "0.5.0", "version": "0.6.0",
"store": { "store": {
"example": { "example": {
"header": { "header": {
"imag": { "imag": {
"version": "0.5.0" "version": "0.6.0"
} }
}, },
"content": "hi there!" "content": "hi there!"

View File

@ -1337,7 +1337,7 @@ mod store_tests {
// Lets have an empty store as input // Lets have an empty store as input
let mut input = Cursor::new(r#" let mut input = Cursor::new(r#"
{ "version": "0.5.0", { "version": "0.6.0",
"store": { } "store": { }
} }
"#); "#);
@ -1374,7 +1374,7 @@ mod store_tests {
Value::Object(ref map) => { Value::Object(ref map) => {
assert!(map.get("version").is_some(), format!("No 'version' in JSON")); assert!(map.get("version").is_some(), format!("No 'version' in JSON"));
match map.get("version").unwrap() { match map.get("version").unwrap() {
&Value::String(ref s) => assert_eq!("0.5.0", s), &Value::String(ref s) => assert_eq!("0.6.0", s),
_ => panic!("Wrong type in JSON at 'version'"), _ => panic!("Wrong type in JSON at 'version'"),
} }
@ -1675,12 +1675,12 @@ mod store_tests {
// Lets have an empty store as input // Lets have an empty store as input
let mut input = Cursor::new(r#" let mut input = Cursor::new(r#"
{ "version": "0.5.0", { "version": "0.6.0",
"store": { "store": {
"example": { "example": {
"header": { "header": {
"imag": { "imag": {
"version": "0.5.0" "version": "0.6.0"
} }
}, },
"content": "foobar" "content": "foobar"
@ -1724,7 +1724,7 @@ mod store_tests {
Value::Object(ref map) => { Value::Object(ref map) => {
assert!(map.get("version").is_some(), format!("No 'version' in JSON")); assert!(map.get("version").is_some(), format!("No 'version' in JSON"));
match map.get("version").unwrap() { match map.get("version").unwrap() {
&Value::String(ref s) => assert_eq!("0.5.0", s), &Value::String(ref s) => assert_eq!("0.6.0", s),
_ => panic!("Wrong type in JSON at 'version'"), _ => panic!("Wrong type in JSON at 'version'"),
} }