test/lazylead/postman_test.rb in lazylead-0.11.3 vs test/lazylead/postman_test.rb in lazylead-0.11.4
- old
+ new
@@ -55,6 +55,38 @@
"template" => "lib/messages/savepoint.erb"
)
)
end
end
+
+ class StdoutPostmanTest < Lazylead::Test
+ # @todo #495/DEV Find way to capture the STDOUT in order to test the email sending.
+ # Right now its just visual verification.
+ test "send email to stdout" do
+ StdoutPostman.new.send(
+ Opts.new(
+ "to" => "to@email.com",
+ "from" => "from@email.com",
+ "attachments" => ["readme.md"],
+ "subject" => "[LL] Attachments",
+ "template" => "lib/messages/savepoint.erb"
+ )
+ )
+ end
+ end
+
+ class FilePostmanTest < Lazylead::Test
+ # @todo #/DEV add new assert method which consume the file name and check existence on the disk
+ test "send email to html file" do
+ FilePostman.new(Log.new, "file_postman_dir" => "test/resources")
+ .send(
+ Opts.new(
+ "to" => "to@email.com",
+ "from" => "from@email.com",
+ "attachments" => ["readme.md"],
+ "subject" => "[LL] Attachments",
+ "template" => "lib/messages/savepoint.erb"
+ )
+ )
+ end
+ end
end