diff options
author | kballou <kballou@devnulllabs.io> | 2016-12-27 10:02:42 -0700 |
---|---|---|
committer | kballou <kballou@devnulllabs.io> | 2016-12-27 10:40:28 -0700 |
commit | 6e36a9c3fb482cc993a3fa6511c51cc19b59d5a2 (patch) | |
tree | 2b70dbdb2ca4ff29927b61a2c0b845945de3b848 /test/exdatadog/config_test.exs | |
parent | b79f51aac09b6a612725e1fae5af283c4025aa34 (diff) | |
download | exdatadog-6e36a9c3fb482cc993a3fa6511c51cc19b59d5a2.tar.gz exdatadog-6e36a9c3fb482cc993a3fa6511c51cc19b59d5a2.tar.xz |
Add base datadog client
This adds a base HTTPoison Datadog Client library.
Diffstat (limited to 'test/exdatadog/config_test.exs')
-rw-r--r-- | test/exdatadog/config_test.exs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/exdatadog/config_test.exs b/test/exdatadog/config_test.exs new file mode 100644 index 0000000..2be0c38 --- /dev/null +++ b/test/exdatadog/config_test.exs @@ -0,0 +1,30 @@ +defmodule Exdatadog.Config.Test do + @moduledoc """ + Provides tests for Exdatadog.Config + """ + use ExUnit.Case + + import Exdatadog.Config + + setup_all do + System.put_env("TEST_VAR", "BAR") + Application.put_env(:test_app, :test_key, {:system, "TEST_VAR"}) + Application.put_env(:test_app, :test_foo, "FOO") + + on_exit fn -> + System.delete_env("TEST_VAR") + Application.delete_env(:test_app, :test_key) + Application.delete_env(:test_app, :test_foo) + end + + end + + test "can read variable from application settings" do + assert get_env_var(:test_app, :test_foo) == "FOO" + end + + test "can read environment variables for settings" do + assert get_env_var(:test_app, :test_key) == "BAR" + end + +end |