Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Caio Salgado committed May 16, 2018
1 parent eaf61c0 commit 7e0776b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/whats/actions/login.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def token
headers: { "Authorization" => "Basic #{encoded_auth}" },
body: {}
)
log "-------------------------\n\n\n PATH -> #{full_path} \n\n\n response -> #{response} \n\n\n------------------------------\n"
puts "-------------------------\n\n\n PATH -> #{full_path} \n\n\n AUTH -> #{encoded_auth} \n\n\n response -> #{response.inspect} \n\n\n------------------------------\n"
update_atributes response

@token
Expand All @@ -31,7 +31,6 @@ def token
private

def update_atributes(response)
log "-------------------------\n\n\n #{response} \n\n------------------------------\n"
if response.failure?
raise Whats::Errors::RequestError.new("API request error.", response)
end
Expand Down
2 changes: 1 addition & 1 deletion spec/support/webmock_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def stub_login(token, credential)
LOGIN_URL,
request_body: "",
response_body: login_response(token),
headers: { "Authorization" => "Bearer dXNlcm5hbWU6c2VjcmV0X3Bhc3N3b3Jk" }
headers: { "Authorization" => "Basic dXNlcm5hbWU6c2VjcmV0X3Bhc3N3b3Jk" }
)
end

Expand Down

0 comments on commit 7e0776b

Please sign in to comment.