Skip to content
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

Write test for StripeConnectAccount.update_from_stripe/1 #628

Open
begedin opened this issue Jan 12, 2017 · 0 comments
Open

Write test for StripeConnectAccount.update_from_stripe/1 #628

begedin opened this issue Jan 12, 2017 · 0 comments

Comments

@begedin
Copy link
Contributor

begedin commented Jan 12, 2017

Problem

Test should ensure the function returns an {:ok, %StripeConnectAccount{}} with valid data. It should also ensure that the record was actually updated with data from stripe testing.

An additional test should ensure that, if there is no local record with the specified id_from_stripe, the response is {:error, :not_found}

Lastly, a test should ensure that, if the attributes provided contain invalid data, an {:error, changeset} is returned.

Something we cannot test right now, since we do not have the infrastructure

  • If the stripe API raises an error, it returns {:error, %StripeAPIErrorResponse{}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants