Skip to content

Commit 6f49d6f

Browse files
committed
Add test for getting contributors
1 parent 713854a commit 6f49d6f

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

bot/test/PRServiceTests.scala

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,14 @@ class PRServiceTests extends PullRequestService {
123123
@Test def canPostReview = {
124124
val invalidUsers = "felixmulder" :: "smarter" :: Nil
125125
val commit = Commit("", Author(Some("smarter")), Author(Some("smarter")), CommitInfo("Added stuff"))
126-
val res = withClient(sendInitialComment(2281, invalidUsers, commit :: Nil, _))
126+
val resBody =
127+
withClient(sendInitialComment(2281, invalidUsers, commit :: Nil, false)(_))
127128

128129
assert(
129-
res.body.contains("We want to keep history") &&
130-
res.body.contains("Could you folks please sign the CLA?") &&
131-
res.body.contains("Have an awesome day!"),
132-
s"Body of review was not as expected:\n${res.body}"
130+
resBody.contains("We want to keep history") &&
131+
resBody.contains("Could you folks please sign the CLA?") &&
132+
resBody.contains("Have an awesome day!"),
133+
s"Body of review was not as expected:\n${resBody}"
133134
)
134135
}
135136

@@ -159,4 +160,9 @@ class PRServiceTests extends PullRequestService {
159160

160161
assert(respondToComment(issueComment).run.status.code == 200)
161162
}
163+
164+
@Test def canGetContributors = {
165+
val contributors = withClient(getContributors(_))
166+
assert(contributors.contains("felixmulder"))
167+
}
162168
}

0 commit comments

Comments
 (0)