backbone-mailing 0.6.0

Email marketing — mass-mail engine: audiences, subscriptions, hand-set mailing lifecycle, seeded A/B testing, per-recipient traces, cycle-44 bridge targets (Odoo mass_mailing port)
//! Integration Tests for mailing
//!
//! Generated by metaphor-schema. Do not edit manually.
//!
//! Run with: cargo test --package backbone-mailing --test integration_tests

#![recursion_limit = "512"]

mod integration;

use integration::tests::*;

#[tokio::test]
async fn test_mailing_ab_test_api() {
    let mut test = MailingAbTestApiTest::new();
    let results = test.run_all().await;

    let failed: Vec<_> = results.iter().filter(|r| !r.success).collect();
    if !failed.is_empty() {
        for f in &failed {
            eprintln!("FAILED: {} - {}", f.test_name, f.details);
        }
        panic!("{} tests failed", failed.len());
    }
}

#[tokio::test]
async fn test_mailing_audience_api() {
    let mut test = MailingAudienceApiTest::new();
    let results = test.run_all().await;

    let failed: Vec<_> = results.iter().filter(|r| !r.success).collect();
    if !failed.is_empty() {
        for f in &failed {
            eprintln!("FAILED: {} - {}", f.test_name, f.details);
        }
        panic!("{} tests failed", failed.len());
    }
}

#[tokio::test]
async fn test_mailing_contact_api() {
    let mut test = MailingContactApiTest::new();
    let results = test.run_all().await;

    let failed: Vec<_> = results.iter().filter(|r| !r.success).collect();
    if !failed.is_empty() {
        for f in &failed {
            eprintln!("FAILED: {} - {}", f.test_name, f.details);
        }
        panic!("{} tests failed", failed.len());
    }
}

#[tokio::test]
async fn test_mailing_subscription_api() {
    let mut test = MailingSubscriptionApiTest::new();
    let results = test.run_all().await;

    let failed: Vec<_> = results.iter().filter(|r| !r.success).collect();
    if !failed.is_empty() {
        for f in &failed {
            eprintln!("FAILED: {} - {}", f.test_name, f.details);
        }
        panic!("{} tests failed", failed.len());
    }
}

#[tokio::test]
async fn test_opt_out_reason_api() {
    let mut test = OptOutReasonApiTest::new();
    let results = test.run_all().await;

    let failed: Vec<_> = results.iter().filter(|r| !r.success).collect();
    if !failed.is_empty() {
        for f in &failed {
            eprintln!("FAILED: {} - {}", f.test_name, f.details);
        }
        panic!("{} tests failed", failed.len());
    }
}

#[tokio::test]
async fn test_mailing_api() {
    let mut test = MailingApiTest::new();
    let results = test.run_all().await;

    let failed: Vec<_> = results.iter().filter(|r| !r.success).collect();
    if !failed.is_empty() {
        for f in &failed {
            eprintln!("FAILED: {} - {}", f.test_name, f.details);
        }
        panic!("{} tests failed", failed.len());
    }
}

#[tokio::test]
async fn test_mailing_trace_api() {
    let mut test = MailingTraceApiTest::new();
    let results = test.run_all().await;

    let failed: Vec<_> = results.iter().filter(|r| !r.success).collect();
    if !failed.is_empty() {
        for f in &failed {
            eprintln!("FAILED: {} - {}", f.test_name, f.details);
        }
        panic!("{} tests failed", failed.len());
    }
}

#[tokio::test]
async fn test_mailing_filter_api() {
    let mut test = MailingFilterApiTest::new();
    let results = test.run_all().await;

    let failed: Vec<_> = results.iter().filter(|r| !r.success).collect();
    if !failed.is_empty() {
        for f in &failed {
            eprintln!("FAILED: {} - {}", f.test_name, f.details);
        }
        panic!("{} tests failed", failed.len());
    }
}