diff options
author | Steven Blowers <shdblowers@gmail.com> | 2016-10-30 18:54:34 +0000 |
---|---|---|
committer | Steven Blowers <shdblowers@gmail.com> | 2016-10-30 18:54:34 +0000 |
commit | 01d88a22c6cc00b561b0114c0865ba52f355d97c (patch) | |
tree | fc38bf9b9642fb3ccc4af6dafe3fdc61faa2d9ec /test/zendex/connection_test.exs | |
parent | 0c19e15c7383ccfbc45bed6c7e4c38d814e60cf6 (diff) | |
download | zendex-01d88a22c6cc00b561b0114c0865ba52f355d97c.tar.gz zendex-01d88a22c6cc00b561b0114c0865ba52f355d97c.tar.xz |
refactor set_up to setup, test for encoding authorization details
Diffstat (limited to 'test/zendex/connection_test.exs')
-rw-r--r-- | test/zendex/connection_test.exs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/zendex/connection_test.exs b/test/zendex/connection_test.exs new file mode 100644 index 0000000..6608b44 --- /dev/null +++ b/test/zendex/connection_test.exs @@ -0,0 +1,12 @@ +defmodule Zendex.ConnectionTest do + use ExUnit.Case, async: true + + test "setup encodes username and password correctly" do + expected = %{authentication: "WHhYQXdlc29tZVVzZXJuYW1lWHhYOnBhc3N3b3JkMTIz", + base_url: ""} + actual = Zendex.Connection.setup("", "XxXAwesomeUsernameXxX", "password123") + + assert expected == actual + end + +end |