Skip to content

Commit

Permalink
Merge pull request #14 from fast-radius/td-cleanup
Browse files Browse the repository at this point in the history
Remove MockClient implementation
  • Loading branch information
teedang19 authored Sep 30, 2020
2 parents 281ccdf + cda0924 commit f920456
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 83 deletions.
3 changes: 0 additions & 3 deletions config/dev.exs

This file was deleted.

3 changes: 0 additions & 3 deletions config/prod.exs

This file was deleted.

2 changes: 1 addition & 1 deletion config/test.exs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
use Mix.Config

config :smartsheet, client: Smartsheet.MockClient
config :smartsheet, api_key: "Test123"
47 changes: 0 additions & 47 deletions lib/smartsheet/mock_client/mock_client.ex

This file was deleted.

25 changes: 0 additions & 25 deletions lib/smartsheet/mock_client/request_fixtures.ex

This file was deleted.

4 changes: 2 additions & 2 deletions lib/smartsheet/parse_response.ex
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ defmodule Smartsheet.ParseResponse do
Enum.map(columns, fn column -> struct(Smartsheet.Column, column) end)
end

def success_response(response = %HTTPoison.Response{}, data) do
defp success_response(response = %HTTPoison.Response{}, data) do
formatted_response = Smartsheet.Response.format(response)
{:ok, formatted_response, data}
end

def error_response(response = %HTTPoison.Response{}) do
defp error_response(response = %HTTPoison.Response{}) do
formatted_response = Smartsheet.Response.format(response)
{:error, formatted_response}
end
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule Smartsheet.MixProject do
app: :smartsheet,
description: "HTTP wrapper around the Smartsheet API",
package: package(),
version: "2.0.0",
version: "2.1.0",
elixir: "~> 1.10",
start_permanent: Mix.env() == :prod,
deps: deps()
Expand Down
2 changes: 1 addition & 1 deletion test/smartsheet/http_client_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ defmodule Smartsheet.HttpClientTest do
test "it appends Authorization Headers" do
headers = {"Content-Type", "application/json"}

assert [{:Authorization, "Bearer "} | {"Content-Type", "application/json"}] ==
assert [{:Authorization, "Bearer Test123"} | {"Content-Type", "application/json"}] ==
HttpClient.process_request_headers(headers)
end
end
Expand Down

0 comments on commit f920456

Please sign in to comment.