code-corps/code-corps-api

Write tests for GitHub.Sync.installation_repositories_event/1

begedin opened this issue · 3 comments

Problem

GitHub.Sync.installation_repositories_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.installation_repositories_event_outcome()

Subtasks

  • write tests for {:ok, list(GithubRepo.t())} outcome
  • write tests for {:error, :unmatched_installation} outcome
  • write tests for {:error, :validation_error_on_syncing_repos, Changeset.t()} outcome
  • write tests for {:error, :unexpected_transaction_outcome, any} outcome

@begedin I'd like to attempt getting this one done, Will get to you with questions

@zacck You might need to work off of #1370 since that one has some pretty major changes to the underlying code.

@begedin awesome will look at it