Skip to main content

refusal

Function refusal 

Source
pub fn refusal<T>(mounted: Result<T>) -> Vec<DeclarationError>
Expand description

The declaration mistakes a panel refused to mount with, for a test to match on their kind.

use tablo_test::{mount, refusal};

let mistakes = refusal(mount(db, panel));
assert!(matches!(
    mistakes[0].kind,
    tablo_core::DeclarationErrorKind::MissingAuthModels { .. }
));

ยงPanics

When mounted succeeded, or failed with an error that is not a MountError.