diff options
Diffstat (limited to 'src/test/fixtures/vapid.rs')
| -rw-r--r-- | src/test/fixtures/vapid.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/fixtures/vapid.rs b/src/test/fixtures/vapid.rs new file mode 100644 index 0000000..29cdf1a --- /dev/null +++ b/src/test/fixtures/vapid.rs @@ -0,0 +1,16 @@ +use p256::ecdsa::VerifyingKey; + +use crate::{app::App, test::fixtures}; + +pub async fn key<P>(app: &App<P>) -> VerifyingKey { + let boot = app.boot().snapshot().await.expect("boot always succeeds"); + let changed = boot + .events + .into_iter() + .filter_map(fixtures::event::vapid) + .filter_map(fixtures::event::vapid::changed) + .next_back() + .expect("the application has a vapid key"); + + changed.key +} |
