Skip to content

Commit 907a836

Browse files
committed
Add test for .following to team_spec
1 parent af16cf8 commit 907a836

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
@@ -86,4 +86,27 @@
8686
end
8787
end
8888
end
89+
90+
describe '.following' do
91+
before do
92+
expect(team).to receive(:request).with(
93+
:get,
94+
'/2.0/teams/team_name/following',
95+
{},
96+
{}
97+
).and_return({"values" => ['following1', 'following2', 'following3']})
98+
end
99+
100+
context "without a block" do
101+
it 'sends a GET request for accounts the team is following' do
102+
team.following('team_name')
103+
end
104+
end
105+
106+
context "with a block" do
107+
it 'sends a GET request for accounts the team is following' do
108+
team.following('team_name') { |followee| followee }
109+
end
110+
end
111+
end
89112
end

0 commit comments

Comments
 (0)