mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-08 02:52:12 +00:00
stable test
This commit is contained in:
1 parent
f0b85893b3
commit
812e966d49
1 file changed
+7
@@ -151,6 +151,13 @@ mod tests {
|
||||
assert_eq!(decoded.last_id, Some(999));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn stable_cursor() {
|
||||
let encoder = OpaqueCursorEncoderV2::new("stable_secret");
|
||||
let encoded = encoder.encode_last_id_cursor("media_files_list", 123456).unwrap();
|
||||
assert_eq!(encoded, "0-8bNhoOVA37eZAKwVQ0B8kWq-HLs0x0gQc51TJXjw2hWJ7PNfVqas7WvRnIK80O");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn different_secrets_produce_different_output() {
|
||||
let encoder_a = OpaqueCursorEncoderV2::new("secret_a");
|
||||
|
||||
Reference in new issue
Block a user