()
| 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() { |