Skip to content

Commit 9d7c5d8

Browse files
committed
Test .participants with a block in pull_requests_spec
1 parent ad28bd7 commit 9d7c5d8

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

spec/bitbucket_rest_api/repos/pull_request_spec.rb

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,19 @@
3232
"/1.0/repositories/mock_user/mock_repo/pullrequests/mock_pull_request_id/participants",
3333
{},
3434
{}
35-
)
35+
).and_return(['participant1', 'participant2', 'participant3'])
3636
end
3737

38-
it 'makes a GET request for all participants belonging to the repo' do
39-
subject.participants('mock_user', 'mock_repo', 'mock_pull_request_id')
38+
context 'without a block' do
39+
it 'makes a GET request for all participants belonging to the repo' do
40+
subject.participants('mock_user', 'mock_repo', 'mock_pull_request_id')
41+
end
42+
end
43+
44+
context 'with a block' do
45+
it 'makes a GET request for all participants belonging to the repo' do
46+
subject.participants('mock_user', 'mock_repo', 'mock_pull_request_id') { |p| p }
47+
end
4048
end
4149
end
4250

0 commit comments

Comments
 (0)