MCPcopy Index your code
hub / github.com/endbasic/endbasic / test_storage_attach_already_attached

Function test_storage_attach_already_attached

std/src/storage/mod.rs:937–955  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

935
936 #[test]
937 fn test_storage_attach_already_attached() {
938 let mut storage = Storage::default();
939 assert_eq!(
940 "Drive 'memory' is already mounted",
941 format!(
942 "{}",
943 storage.attach("memory", "z://", Box::from(InMemoryDrive::default())).unwrap_err()
944 )
945 );
946
947 storage.attach("new", "z://", Box::from(InMemoryDrive::default())).unwrap();
948 assert_eq!(
949 "Drive 'New' is already mounted",
950 format!(
951 "{}",
952 storage.attach("New", "z://", Box::from(InMemoryDrive::default())).unwrap_err()
953 )
954 );
955 }
956
957 #[test]
958 fn test_storage_has_scheme() {

Callers

nothing calls this directly

Calls 1

attachMethod · 0.80

Tested by

no test coverage detected