Skip to main content

TestApplication

Trait TestApplication 

Source
pub trait TestApplication: Sized {
    // Required methods
    fn test_config(&self) -> Result<AppConfig>;
    fn boot_test(
        self,
        context: AppContext,
        migrate: bool,
    ) -> impl Future<Output = Result<TestApp>> + Send;
}
Expand description

Adapter implemented by Capy’s normal App builder, not a separate test router.

Required Methods§

Source

fn test_config(&self) -> Result<AppConfig>

Resolve the application’s configuration without opening a database.

Source

fn boot_test( self, context: AppContext, migrate: bool, ) -> impl Future<Output = Result<TestApp>> + Send

Apply the application’s own migrations and construct its normal router/services.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§