Skip to content

Commit ea61e3b

Browse files
committed
Test .list when block is supplied in changesets_spec
1 parent 801e026 commit ea61e3b

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

spec/bitbucket_rest_api/repos/changesets_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/changesets',
1111
{},
1212
{}
13-
)
13+
).and_return(['changset1', 'changeset2', 'changeset3'])
14+
end
15+
16+
context 'without a block' do
17+
it 'should send a GET request for the changesets belonging to the given repo' do
18+
changesets.list('mock_username', 'mock_repo')
19+
end
1420
end
1521

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

0 commit comments

Comments
 (0)