1 parent
6c15491284
commit
31634543f0
6 files changed
+40
-6
No files matched your search
+16
-4
@@ -2002,18 +2002,30 @@ async fn send_returns_400_with_empty_body_and_subject() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn send_returns_503_when_smtp_not_configured() {
|
||||
async fn send_returns_503_when_session_has_no_smtp_endpoint() {
|
||||
let static_dir = setup_static_dir();
|
||||
let data_dir = TempDir::new().unwrap();
|
||||
// Use config WITHOUT smtp_host
|
||||
let config = test_config_with_imap(
|
||||
static_dir.path().to_str().unwrap(),
|
||||
data_dir.path().to_str().unwrap(),
|
||||
);
|
||||
let store = test_store();
|
||||
let (browser_id, account_id, token) = setup_test_account(&store, "alice@example.com");
|
||||
let browser_id = store.create_browser();
|
||||
let email = "alice@example.com";
|
||||
let (token, account_id) = store.add_account_to_browser(
|
||||
&browser_id,
|
||||
email.to_string(),
|
||||
"password".to_string(),
|
||||
crate::auth::user_data::hash_email(email),
|
||||
"imap.example.com".to_string(),
|
||||
993,
|
||||
true,
|
||||
String::new(),
|
||||
587,
|
||||
true,
|
||||
);
|
||||
|
||||
let user_hash = crate::auth::user_data::hash_email("alice@example.com");
|
||||
let user_hash = crate::auth::user_data::hash_email(email);
|
||||
provision_user_db(data_dir.path().to_str().unwrap(), &user_hash);
|
||||
|
||||
let app = create_router(
|
||||
|
||||
Reference in new issue
Block a user