MCPcopy Create free account
hub / github.com/dfinity/orbit / test_artifact_creation

Function test_artifact_creation

core/control-panel/impl/src/models/artifact.rs:151–162  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

149
150 #[test]
151 fn test_artifact_creation() {
152 let artifact = Artifact::new(b"hello world".to_vec());
153
154 assert_eq!(
155 artifact.hash(),
156 vec![
157 185, 77, 39, 185, 147, 77, 62, 8, 165, 46, 82, 215, 218, 125, 171, 250, 196, 132,
158 239, 227, 122, 83, 128, 238, 144, 136, 247, 172, 226, 239, 205, 233,
159 ]
160 );
161 assert_eq!(artifact.artifact(), b"hello world");
162 }
163
164 #[test]
165 fn artifact_with_same_hash_is_invalid() {

Callers

nothing calls this directly

Calls 1

to_vecMethod · 0.80

Tested by

no test coverage detected