From 6e36a9c3fb482cc993a3fa6511c51cc19b59d5a2 Mon Sep 17 00:00:00 2001 From: kballou Date: Tue, 27 Dec 2016 10:02:42 -0700 Subject: Add base datadog client This adds a base HTTPoison Datadog Client library. --- test/exdatadog/config_test.exs | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 test/exdatadog/config_test.exs (limited to 'test/exdatadog/config_test.exs') 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 -- cgit v1.2.1