forked from kemitix/git-next
26 lines
542 B
Rust
26 lines
542 B
Rust
|
mod auth {
|
||
|
use crate::WebhookAuth;
|
||
|
|
||
|
#[test]
|
||
|
fn bytes() -> Result<(), Box<dyn std::error::Error>> {
|
||
|
let ulid = ulid::Ulid::new();
|
||
|
|
||
|
let wa = WebhookAuth::new(ulid.to_string().as_str())?;
|
||
|
|
||
|
assert_eq!(ulid.to_bytes(), wa.to_bytes());
|
||
|
|
||
|
Ok(())
|
||
|
}
|
||
|
|
||
|
#[test]
|
||
|
fn string() -> Result<(), Box<dyn std::error::Error>> {
|
||
|
let ulid = ulid::Ulid::new();
|
||
|
|
||
|
let wa = WebhookAuth::new(ulid.to_string().as_str())?;
|
||
|
|
||
|
assert_eq!(ulid.to_string(), wa.to_string());
|
||
|
|
||
|
Ok(())
|
||
|
}
|
||
|
}
|