code-corps / code-corps/code-corps-api

Write test for StripeConnectAccount.update_from_stripe/1

Ouverte
#628 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Elixir
Étoiles
234
Forks
82
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

# 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{}}`

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.