-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Credo powered improvements for monei #47
Conversation
Removed the pipes and spaces
0b5043b
to
223726d
Compare
`paymentId` -> `payment_id`
* I had missed a few `paymentId`s. * Since #48 is merged, we can use full_name(). Coverage increased for free :)
lib/gringotts/gateways/monei.ex
Outdated
:delete -> HTTPoison.delete(url <> "?" <> URI.encode_query(auth_params)) |> respond | ||
end | ||
network_response = case method do | ||
:post -> HTTPoison.post(url, {:form, body}, @default_headers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oyeb we discussed formatting for this as per latest formatter code, make that change.
lib/gringotts/gateways/monei.ex
Outdated
@@ -415,9 +416,10 @@ defmodule Gringotts.Gateways.Monei do | |||
avs_result: [address: address, zip_code: zip_code], | |||
raw: data] | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formatting for this should be something like
results = [
code: code,
description: result["description"],
]
test/gateways/monei_test.exs
Outdated
end) | ||
{:error, response} = Gateway.unstore("7214344252e11af79c0b9e7b4f3f6234", [config: auth]) | ||
assert response.code == :undefined_response_from_monei | ||
describe "unstore |" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove pipe here.
* Fixed unstore test description * Example cards will expire in 82 yrs :P
* Refactored code as suggested by credo Closes #27 * Grouped tests using describe * Better test descriptions Removed the pipes and spaces * Renamed ia CamelCase var. `paymentId` -> `payment_id` * Renamed missed CamelCase var, improves CC coverage * I had missed a few `paymentId`s. * Since #48 is merged, we can use full_name(). Coverage increased for free :) * Ran the elixir 1.6 formatter on Monei * Fixed unstore test description * Example cards will expire in 82 yrs :P
describe
credo