Commit a284f664 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

test/types: refactor out an unwrap call

parent 79844774
...@@ -335,16 +335,17 @@ fn test_read_merge_request() { ...@@ -335,16 +335,17 @@ fn test_read_merge_request() {
merge_request.sha, merge_request.sha,
Some(ObjectId::new("04e94ae667024a62a90179f395bfdc2b35f3efd2")), Some(ObjectId::new("04e94ae667024a62a90179f395bfdc2b35f3efd2")),
); );
let diff_refs = merge_request.diff_refs.as_ref().unwrap();
assert_eq!( assert_eq!(
merge_request.diff_refs.as_ref().unwrap().base_sha, diff_refs.base_sha,
Some(ObjectId::new("981262b03fc0149c1677ca51ea47b570e30d6a90")), Some(ObjectId::new("981262b03fc0149c1677ca51ea47b570e30d6a90")),
); );
assert_eq!( assert_eq!(
merge_request.diff_refs.as_ref().unwrap().head_sha, diff_refs.head_sha,
Some(ObjectId::new("04e94ae667024a62a90179f395bfdc2b35f3efd2")), Some(ObjectId::new("04e94ae667024a62a90179f395bfdc2b35f3efd2")),
); );
assert_eq!( assert_eq!(
merge_request.diff_refs.as_ref().unwrap().start_sha, diff_refs.start_sha,
Some(ObjectId::new("981262b03fc0149c1677ca51ea47b570e30d6a90")), Some(ObjectId::new("981262b03fc0149c1677ca51ea47b570e30d6a90")),
); );
assert_eq!(merge_request.merge_error, None); assert_eq!(merge_request.merge_error, None);
......
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