Skip to content

Commit

Permalink
tests/Spec: reindent candidateState
Browse files Browse the repository at this point in the history
  • Loading branch information
rudymatela committed Jul 19, 2022
1 parent 08acc5c commit 4910759
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions tests/Spec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,12 @@ singlePullRequestState pr prBranch baseBranch prSha prAuthor =
in
fst $ runAction $ handleEventTest event Project.emptyProjectState

candidateState :: PullRequestId -> Branch -> BaseBranch -> Sha -> Username -> Username -> Sha -> ProjectState
candidateState pr prBranch baseBranch prSha prAuthor approvedBy candidateSha =
let
state = Project.setIntegrationStatus pr
(Project.Integrated candidateSha Project.BuildPending)
$ Project.setApproval pr (Just (Approval approvedBy Project.Merge 0))
$ singlePullRequestState pr prBranch baseBranch prSha prAuthor
in
state
candidateState
:: PullRequestId -> Branch -> BaseBranch -> Sha -> Username -> Username -> Sha -> ProjectState
candidateState pr prBranch baseBranch prSha prAuthor approvedBy candidateSha
= Project.setIntegrationStatus pr (Project.Integrated candidateSha Project.BuildPending)
$ Project.setApproval pr (Just (Approval approvedBy Project.Merge 0))
$ singlePullRequestState pr prBranch baseBranch prSha prAuthor

-- Types and functions to mock running an action without actually doing anything.

Expand Down

0 comments on commit 4910759

Please sign in to comment.