use jazz_telepathy::TelepathyNode; #[test] fn should_be_able_to_create_and_write_to_a_new_set() { let mut node = TelepathyNode::create(); let set_access = node.local_state.sets.create_set(); let set_item_hash = node .local_state .sets .insert(&set_access, vec![0, 1, 2, 3], None) .unwrap(); let (stored_hash, stored_item) = node .local_state .sets .current_items(&set_access.id()) .unwrap() .iter() .next() .unwrap(); assert_eq!(stored_hash, &set_item_hash); assert_eq!(stored_item.data, &[0, 1, 2, 3]); }