MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / assert_refused

Function assert_refused

libatomic/tests/sandbox_service_test.rs:202–213  ·  view source on GitHub ↗
(result: Result<T, Status>, code: Code, contract: &str)

Source from the content-addressed store, hash-verified

200}
201
202fn assert_refused<T>(result: Result<T, Status>, code: Code, contract: &str) {
203 match result {
204 Ok(_) => panic!("expected {contract}, got a success"),
205 Err(status) => {
206 assert_eq!(status.code(), code, "{status:?}");
207 assert!(
208 status.message().contains(contract),
209 "expected {contract}: {status:?}"
210 );
211 }
212 }
213}
214
215// ── the link: the cache's way to the handlers ───────────────────────────
216

Calls

no outgoing calls

Tested by

no test coverage detected