Skip to content

Commit

Permalink
Merge branch 'fix-typo'
Browse files Browse the repository at this point in the history
  • Loading branch information
rebelvc committed Apr 23, 2015
2 parents aa83930 + c13490d commit a36a4c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions lib/synapse_client/customer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,12 @@ def create
update_attributes(response.data)
end

def self.retrieve(access_token, refresh_token)
def self.retrieve(access_token)
response = SynapseClient.request(:post, url + "show", {:access_token => access_token})

return response unless response.successful?
Customer.new(response.data.user.merge({
:access_token => access_token,
:refresh_token => refresh_token
:access_token => access_token
}))
end

Expand Down
3 changes: 1 addition & 2 deletions spec/synapse_client_customer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

describe "retrieving a customer" do
it "should successfully return a customer object with tokens and other info." do
customer = SynapseClient::Customer.retrieve(@customer.access_token, @customer.refresh_token)
customer = SynapseClient::Customer.retrieve(@customer.access_token)

expect(customer).to be_a SynapseClient::Customer

Expand All @@ -39,7 +39,6 @@
expect(customer.username).to be_a String

expect(customer.access_token).to be_a String
expect(customer.refresh_token).to be_a String
end
end

Expand Down

0 comments on commit a36a4c5

Please sign in to comment.