emailit 2.0.3

The official Rust SDK for the Emailit Email API
Documentation
use emailit::Emailit;

#[test]
fn test_new_client() {
    let client = Emailit::new("test_key");
    assert_eq!(client.api_key(), "test_key");
    assert_eq!(client.base_url(), "https://api.emailit.com");
}

#[test]
fn test_custom_base_url() {
    let client = Emailit::with_base_url("test_key", "https://custom.api.com/");
    assert_eq!(client.base_url(), "https://custom.api.com");
}

#[test]
fn test_trailing_slash_stripped() {
    let client = Emailit::with_base_url("test_key", "https://example.com///");
    assert_eq!(client.base_url(), "https://example.com");
}

#[test]
#[should_panic(expected = "api_key is required")]
fn test_empty_api_key_panics() {
    Emailit::new("");
}

#[test]
fn test_version() {
    assert!(!emailit::VERSION.is_empty());
}