Better utf8 invalid test

pull/38/merge
Thijs Cadier 7 years ago
parent 2edd61d2e9
commit 2eae40d9c6

@ -65,7 +65,7 @@ fn test_utf8_invalid() {
let collection = client.get_collection("rust_driver_test", "bulk_operation_utf8_invalid"); let collection = client.get_collection("rust_driver_test", "bulk_operation_utf8_invalid");
let bulk_operation = collection.create_bulk_operation(None); let bulk_operation = collection.create_bulk_operation(None);
let value = unsafe { String::from_utf8_unchecked(b"\xF0\xA4\xAD\xA2".to_vec()) }; let value = unsafe { String::from_utf8_unchecked(vec![10, 11, 12, 13, 14, 15, 16, 17]) };
let document = doc! {"key_1" => value}; let document = doc! {"key_1" => value};
bulk_operation.insert(&document).unwrap(); bulk_operation.insert(&document).unwrap();
assert!(bulk_operation.execute().is_ok()); assert!(bulk_operation.execute().is_ok());

Loading…
Cancel
Save