mirror of
https://tangled.org/tranquil.farm/tranquil-pds
synced 2026-08-29 20:26:58 +00:00
test: i dunno what youre talking about i would never leave prints in production code 🙃
Signed-off-by: Trezy <tre@trezy.com>
This commit is contained in:
@@ -441,28 +441,20 @@ mod tests {
|
||||
GrantCoverage::Withheld
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod scratch_transition_probe {
|
||||
use super::*;
|
||||
#[test]
|
||||
fn probe() {
|
||||
let g = "atproto repo:* blob:*/* rpc:* identity:* account:*?action=manage transition:generic transition:chat transition:email";
|
||||
println!(
|
||||
"validate mixed grant: {:?}",
|
||||
ValidatedDelegationScope::new(g).is_ok()
|
||||
fn test_grant_may_mix_transition_and_granular_scopes() {
|
||||
assert!(ValidatedDelegationScope::new(OWNER_FULL_SCOPES).is_ok());
|
||||
assert_eq!(
|
||||
intersect_scopes("atproto transition:generic", OWNER_FULL_SCOPES),
|
||||
"atproto transition:generic"
|
||||
);
|
||||
for s in ["transition:generic", "transition:chat", "transition:email"] {
|
||||
println!(" {s} -> {:?}", grant_coverage(g, s));
|
||||
println!(
|
||||
" {s} under CURRENT owner -> {:?}",
|
||||
grant_coverage(OWNER_FULL_SCOPES, s)
|
||||
);
|
||||
}
|
||||
println!(
|
||||
"intersect(transition:generic, mixed grant) = {:?}",
|
||||
intersect_scopes("atproto transition:generic", g)
|
||||
assert_eq!(
|
||||
intersect_scopes(
|
||||
"atproto repo:app.bsky.feed.post?action=create",
|
||||
OWNER_FULL_SCOPES
|
||||
),
|
||||
"atproto repo:app.bsky.feed.post?action=create"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user