code-corps-api icon indicating copy to clipboard operation
code-corps-api copied to clipboard

Write tests for GitHub.Sync.pull_request_event/1

Open begedin opened this issue 7 years ago • 3 comments

Problem

GitHub.Sync.pull_request_event/1 is currently completely untested. Since we want to unit test it's individual elements to, it should suffice to test each possible outcome of the transaction performed by the tests, as defined by GitHub.Sync.pull_request_event_outcome()

Subtasks

  • [x] write test for {:ok, map} outcome
  • [x] write test for {:error, :repo_not_found} outcome
  • [x] write test for {:error, :fetching_issue, struct} outcome
  • [x] write test for {:error, :validating_github_pull_request, Changeset.t()} outcome
  • [ ] write test for {:error, :validating_github_issue, Changeset.t()} outcome
  • [ ] write test for {:error, :validating_user, Changeset.t()} outcome
  • [ ] write test for {:error, :multiple_issue_users_match} outcome
  • [x] write test for {:error, :validating_task, Changeset.t()} outcome
  • [ ] write test for {:error, :unexpected_transaction_outcome, any} outcome

begedin avatar Jan 17 '18 15:01 begedin

@begedin Any major changes coming up to this or should i start working? Talking with reference similar to this https://github.com/code-corps/code-corps-api/issues/1374#issuecomment-361160258

vishaldeepak avatar Jan 29 '18 07:01 vishaldeepak

@vishaldeepak Same as #1374, I would recommend branching off of #1370 and then submitting a PR against that onne. Once #1370 is merged, we can then rebase onto develop.

begedin avatar Jan 29 '18 12:01 begedin

Going to jump on this one since its still up for grabs ...

zacck-zz avatar Feb 27 '18 10:02 zacck-zz