-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
432d23b
commit e4fdefa
Showing
1 changed file
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -886,7 +886,7 @@ pub async fn test_system_smtp(ctx: RpcContext, smtp: SmtpValue) -> Result<(), Er | |
.from((from.clone(), login.clone())) | ||
.to(vec![(from, login.clone())]) | ||
.subject("StartOS Test Email") | ||
.text_body("Email credentials have been successfully setup on your StartOS Server"); | ||
.text_body("This is a test emails sent from your StartOS Server"); | ||
SmtpClientBuilder::new(server, port) | ||
.implicit_tls(false) | ||
.credentials((login, pass_val)) | ||
|
@@ -905,6 +905,23 @@ pub async fn test_system_smtp(ctx: RpcContext, smtp: SmtpValue) -> Result<(), Er | |
} | ||
} | ||
|
||
#[tokio::test] | ||
async fn test_system_smtp_integration() -> Result<()> { | ||
// Arrange | ||
let ctx = RpcContext::new(); | ||
let smtp = SmtpValue { | ||
server: "smtp.gmail.com".to_string(), | ||
port: 587, | ||
from: "[email protected]".to_string(), | ||
login: "rkaht".to_string(), | ||
password: Some("$E2#Cm9tXLoXrKRUfW6gG&*e".to_string()), | ||
}; | ||
|
||
let result = test_system_smtp(ctx, smtp).await; | ||
assert!(result.is_ok()); | ||
Ok(()) | ||
} | ||
|
||
#[tokio::test] | ||
#[ignore] | ||
pub async fn test_get_temp() { | ||
|