Skip to content

Commit 47c60fb

Browse files
committed
Add test for followers to team_spec
1 parent f87aa39 commit 47c60fb

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

spec/bitbucket_rest_api/team_spec.rb

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,27 @@
6363
end
6464
end
6565
end
66+
67+
describe '.followers' do
68+
before do
69+
expect(team).to receive(:request).with(
70+
:get,
71+
'/2.0/teams/team_name/followers',
72+
{},
73+
{}
74+
).and_return({"values" => ['follower1', 'follower2', 'follower3']})
75+
end
76+
77+
context "without a block" do
78+
it 'sends a GET request for the followers of the team' do
79+
team.followers('team_name')
80+
end
81+
end
82+
83+
context "with a block" do
84+
it 'sends a GET request for the followers of the team' do
85+
team.followers('team_name') { |follower| follower }
86+
end
87+
end
88+
end
6689
end

0 commit comments

Comments
 (0)