Skip to content

Commit ad28bd7

Browse files
committed
Test .list with a block in pull_requests_spec
1 parent 8556d02 commit ad28bd7

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
@@ -9,11 +9,19 @@
99
'/2.0/repositories/mock_user/mock_repo/pullrequests',
1010
{},
1111
{}
12-
)
12+
).and_return(['pr1', 'pr2', 'pr3'])
13+
end
14+
15+
context 'without a block' do
16+
it 'makes a GET request for all pull requests belonging to the repo' do
17+
subject.list('mock_user', 'mock_repo')
18+
end
1319
end
1420

15-
it 'makes a GET request for all pull requests belonging to the repo' do
16-
subject.list('mock_user', 'mock_repo')
21+
context 'with a block' do
22+
it 'makes a GET request for all pull requests belonging to the repo' do
23+
subject.list('mock_user', 'mock_repo') { |pr| pr }
24+
end
1725
end
1826
end
1927

0 commit comments

Comments
 (0)