Skip to content

Commit

Permalink
✨ Add email example tests
Browse files Browse the repository at this point in the history
  • Loading branch information
malted committed Sep 5, 2024
1 parent b366f15 commit 83fe2a6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "replit-takeout"
version = "1.4.0"
version = "1.4.1"
edition = "2021"
authors = ["Ben Dixon <malted@malted.dev>"]

Expand Down
24 changes: 23 additions & 1 deletion examples/email.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,29 @@ use replit_takeout::email;

#[tokio::main]
async fn main() {
email::emails::send_greet_email("test@malted.dev", "test")
email::emails::send_greet_email("test@malted.dev", "malted")
.await
.expect("an email to be sent");

email::emails::send_partial_success_email(
"test@malted.dev",
"malted",
5,
&vec![String::from("foo")],
"https://google.com",
)
.await
.expect("an email to be sent");

email::emails::send_success_email("test@malted.dev", "malted", 5, "https://google.com")
.await
.expect("an email to be sent");

email::emails::send_failed_no_repls_email("test@malted.dev", "malted")
.await
.expect("an email to be sent");

email::emails::send_failure_email("test@malted.dev", "malted")
.await
.expect("an email to be sent");
}

0 comments on commit 83fe2a6

Please sign in to comment.