Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ status](https://www.r-pkg.org/badges/version/blastula)](https://CRAN.R-project.o
[![Travis-CI Build
Status](https://travis-ci.org/rich-iannone/blastula.svg?branch=master)](https://travis-ci.org/rich-iannone/blastula)
[![Codecov test
coverage](https://codecov.io/gh/rich-iannone/blastula/branch/master/graph/badge.svg)](https://codecov.io/gh/rich-iannone/blastula?branch=master)
coverage](https://codecov.io/gh/pilipino/blastula/branch/master/graph/badge.svg)](https://codecov.io/gh/pilipino/blastula?branch=master)

## Overview

Expand Down
31 changes: 31 additions & 0 deletions tests/testthat/test-smtp_send.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
context("SMTP send")

test_that("Email is of expected format", {
# Illegal inputs
expect_error(smtp_send("hello"))
})

test_that("Creds File Deprecation", {

email <- compose_email("email")

cf <- creds_file(
file = "test_creds_file"
)

expect_error(smtp_send(email=email, from = "sender@email.com",to = "recipient@email.com",
creds_file = cf))
})

test_that("Credentials is NULL", {
email <- compose_email("email")
expect_error(smtp_send(email, from = "sender@email.com",to = "recipient@email.com", credentials=NULL))
})


test_that("Credentials is Blastula class", {

expect_error(smtp_send(from = "sender@email.com",to = "recipient@email.com",
"hello"
))
})