aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMentor Ágil <mentoragil@gmail.com>2015-05-12 22:11:49 -0300
committerMentor Ágil <mentoragil@gmail.com>2015-05-12 22:11:49 -0300
commit765438c4c2c300f84364b978a0b199a0e69c4e80 (patch)
tree8641ea4d3910a28fa8c702ee057251ce2d751abe /test
downloadmailchimp-765438c4c2c300f84364b978a0b199a0e69c4e80.tar.gz
mailchimp-765438c4c2c300f84364b978a0b199a0e69c4e80.tar.xz
first commit
Diffstat (limited to 'test')
-rw-r--r--test/mailchimp_test.exs26
-rw-r--r--test/test_helper.exs1
2 files changed, 27 insertions, 0 deletions
diff --git a/test/mailchimp_test.exs b/test/mailchimp_test.exs
new file mode 100644
index 0000000..b896fc4
--- /dev/null
+++ b/test/mailchimp_test.exs
@@ -0,0 +1,26 @@
+defmodule MailchimpTest do
+ use ExUnit.Case
+
+ test "if mailchimp apikey config exists" do
+ prop = Application.get_env(:mailchimp, :apikey)
+ assert false == is_nil prop
+ end
+
+ test "if apikey contains the server name" do
+ len = Application.get_env(:mailchimp, :apikey)
+ |> String.split(~r{-})
+ |> length
+ assert len == 2
+ end
+
+ test "it can start application" do
+ {status, _} = Mailchimp.start_link([])
+ assert :ok == status
+ end
+
+ test "it can get shard from apikey" do
+ shard = Mailchimp.get_shard
+ assert false == is_nil shard
+ end
+
+end
diff --git a/test/test_helper.exs b/test/test_helper.exs
new file mode 100644
index 0000000..869559e
--- /dev/null
+++ b/test/test_helper.exs
@@ -0,0 +1 @@
+ExUnit.start()