Skip to content

Commit 984fb27

Browse files
committed
Test .list with a block in keys_spec
1 parent 9e5e17e commit 984fb27

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

spec/bitbucket_rest_api/repos/keys_spec.rb

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,19 @@
99
'/1.0/repositories/mock_username/mock_repo/deploy-keys/',
1010
{},
1111
{}
12-
)
12+
).and_return(['key1', 'key2', 'key3'])
13+
end
14+
15+
context 'without a block' do
16+
it 'should make a GET request for the deploy keys belonging to the given repo' do
17+
deploy_keys.list('mock_username', 'mock_repo')
18+
end
1319
end
1420

15-
it 'should make a GET request for the deploy keys belonging to the given repo' do
16-
deploy_keys.list('mock_username', 'mock_repo')
21+
context 'with a block' do
22+
it 'should make a GET request for the deploy keys belonging to the given repo' do
23+
deploy_keys.list('mock_username', 'mock_repo') { |key| key }
24+
end
1725
end
1826
end
1927

0 commit comments

Comments
 (0)