Skip to content

Commit cc55583

Browse files
committed
Add tests for pull_requests and oauth getter methods in client_spec
1 parent 4db6098 commit cc55583

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/bitbucket_rest_api/client.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ def issues(options = {})
1616

1717
# An API for users to manage their own tokens.
1818
def oauth(options = {})
19-
raise "Unimpletmented"
20-
#@oauth ||= ApiFactory.new 'Authorizations', options
19+
@oauth ||= ApiFactory.new 'Request::OAuth', options
2120
end
2221
alias :authorizations :oauth
2322

@@ -27,8 +26,7 @@ def teams(options = {})
2726
end
2827

2928
def pull_requests(options = {})
30-
raise "Unimplemented"
31-
#@pull_requests ||= ApiFactory.new 'PullRequests', options
29+
@pull_requests ||= ApiFactory.new 'Repos::PullRequest', options
3230
end
3331

3432
def repos(options = {})

spec/bitbucket_rest_api/client_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@
99
expect(client.users).to be_a BitBucket::Users
1010
expect(client.user_api).to be_a BitBucket::User
1111
expect(client.invitations).to be_a BitBucket::Invitations
12+
expect(client.pull_requests).to be_a BitBucket::Repos::PullRequest
13+
expect(client.oauth).to be_a BitBucket::Request::OAuth
1214
end
1315
end

0 commit comments

Comments
 (0)