Skip to content

Commit 0c16edd

Browse files
committed
Test .list with a block in comments_spec
1 parent a15a144 commit 0c16edd

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

spec/bitbucket_rest_api/issues/comments_spec.rb

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,19 @@
1010
'/1.0/repositories/mock_username/mock_repo/issues/mock_issue_id/comments/',
1111
{},
1212
{}
13-
)
13+
).and_return(['comment1', 'comment2', 'comment3'])
14+
end
15+
16+
context 'without a block' do
17+
it 'should make a GET request for the given issue' do
18+
comments.list('mock_username', 'mock_repo', 'mock_issue_id')
19+
end
1420
end
1521

16-
it 'should make a GET request for the given issue' do
17-
comments.list('mock_username', 'mock_repo', 'mock_issue_id')
22+
context 'with a block' do
23+
it 'should make a GET request for the given issue' do
24+
comments.list('mock_username', 'mock_repo', 'mock_issue_id') { |comment| comment }
25+
end
1826
end
1927
end
2028

0 commit comments

Comments
 (0)