Skip to main content

assert_not_found_error

Function assert_not_found_error 

Source
pub fn assert_not_found_error<T>(result: Result<T>)
Expand description

Assert that a result is a NotFound error

§Examples

use reinhardt_testkit::assertions::assert_not_found_error;
use reinhardt_http::{Error, Result};

let result: Result<()> = Err(Error::NotFound("User not found".to_string()));
assert_not_found_error(result);

§Panics

Panics if result is Ok or a different error type.