diff options
author | Mentor Ágil <mentoragil@gmail.com> | 2015-05-12 22:11:49 -0300 |
---|---|---|
committer | Mentor Ágil <mentoragil@gmail.com> | 2015-05-12 22:11:49 -0300 |
commit | 765438c4c2c300f84364b978a0b199a0e69c4e80 (patch) | |
tree | 8641ea4d3910a28fa8c702ee057251ce2d751abe /test | |
download | mailchimp-765438c4c2c300f84364b978a0b199a0e69c4e80.tar.gz mailchimp-765438c4c2c300f84364b978a0b199a0e69c4e80.tar.xz |
first commit
Diffstat (limited to 'test')
-rw-r--r-- | test/mailchimp_test.exs | 26 | ||||
-rw-r--r-- | test/test_helper.exs | 1 |
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() |