Skip to content

Commit a15a144

Browse files
committed
Test .list with a block in forks_spec
1 parent eb25824 commit a15a144

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

spec/bitbucket_rest_api/repos/forks_spec.rb

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,19 @@
1010
'/2.0/repositories/mock_username/mock_repo/forks/',
1111
{},
1212
{}
13-
)
13+
).and_return(['fork1', 'fork2', 'fork3'])
14+
end
15+
16+
context 'without a block' do
17+
it 'sends a GET request for the forks of the given repo' do
18+
forks.list('mock_username', 'mock_repo')
19+
end
1420
end
1521

16-
it 'sends a GET request for the forks of the given repo' do
17-
forks.list('mock_username', 'mock_repo')
22+
context 'with a block' do
23+
it 'sends a GET request for the forks of the given repo' do
24+
forks.list('mock_username', 'mock_repo') { |fork| fork }
25+
end
1826
end
1927
end
2028

0 commit comments

Comments
 (0)