Skip to content

Commit 9e5e17e

Browse files
committed
Test .list with a block in components_spec
1 parent ea61e3b commit 9e5e17e

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

spec/bitbucket_rest_api/issues/components_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/components',
1111
{},
1212
{}
13-
)
13+
).and_return(['component1', 'component2', 'component3'])
14+
end
15+
16+
context 'without a block' do
17+
it 'makes a GET request for the components belonging to the given repo' do
18+
subject.list('mock_username', 'mock_repo')
19+
end
1420
end
1521

16-
it 'makes a GET request for the components belonging to the given repo' do
17-
subject.list('mock_username', 'mock_repo')
22+
context 'with a block' do
23+
it 'makes a GET request for the components belonging to the given repo' do
24+
subject.list('mock_username', 'mock_repo') { |component| component }
25+
end
1826
end
1927
end
2028

0 commit comments

Comments
 (0)