tests/testthat/test-textslackr.R

context("textslackr")

test_that("errors when given bad inputs", {
# 	expect_error(textslackr(c(1,2),'api-test-private'), "text must be a vector of length one")
# 	expect_error(textslackr('a',1),"channel must be a character vector of length one")
# 	expect_error(textslackr('a','api-test-private',preformatted='a'),"preformatted must be a logical vector of length one")
# 	expect_error(textslackr('a','api-test-private',icon_emoji=1),"icon_emoji must be a character vector of length one")
})
hrbrmstr/slackr documentation built on May 18, 2018, 4:19 p.m.