Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
quambene committed May 2, 2024
1 parent c260fd3 commit f9a183e
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions tests/cmd/test_send.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,13 @@ fn test_send_smtp() {
"smtp",
]);
cmd.assert().success().stdout(
str::contains("Reading csv file './receiver.csv' ...")
.and(str::contains("Display csv file:").and(str::contains("Display emails:"))),
str::contains("Reading message file './message.yaml' ...")
.and(str::contains("Display message file:"))
.and(str::contains("Display email:"))
.and(str::contains("Sending email to 1 receiver ..."))
.and(str::contains("Email sent"))
.and(str::contains("Archiving"))
.and(str::contains("Dry run:").not()),
);

assert!(temp_path.join("my-sent-emails").exists());
Expand Down Expand Up @@ -88,8 +93,13 @@ fn test_send_aws() {
"aws",
]);
cmd.assert().success().stdout(
str::contains("Reading csv file './receiver.csv' ...")
.and(str::contains("Display csv file:").and(str::contains("Display email:"))),
str::contains("Reading message file './message.yaml' ...")
.and(str::contains("Display message file:"))
.and(str::contains("Display email:"))
.and(str::contains("Sending email to 1 receiver ..."))
.and(str::contains("Email sent"))
.and(str::contains("Archiving"))
.and(str::contains("Dry run:").not()),
);

assert!(temp_path.join("my-sent-emails").exists());
Expand Down

0 comments on commit f9a183e

Please sign in to comment.