Skip to content

Commit

Permalink
Fix rspec user agent version in webmock requests
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarrdz committed Mar 19, 2016
1 parent 34ee910 commit d2c6b5a
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions spec/requests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,29 @@ def multiple_device_requests
private

def common_headers
{ 'Connection' => 'close',
{
'Connection' => 'close',
'Content-Type' => 'application/json',
'Host' => 'api.pushbots.com',
'User-Agent' => 'http.rb/1.0.2',
'User-Agent' => /./,
'X-Pushbots-Appid' => 'Application ID',
'X-Pushbots-Secret' => 'Application Secret' }
'X-Pushbots-Secret' => 'Application Secret'
}
end

def single_device_content(token, msg, sound)
{ 'platform' => 1,
'token' => token,
'msg' => msg,
'sound' => sound }.to_json
'sound' => sound
}.to_json
end

def multiple_device_content(platforms, msg, schedule)
{ 'platform' => platforms,
'msg' => msg,
'schedule' => schedule }.to_json
'schedule' => schedule
}.to_json
end

def pushbots_single_request(method, token, message, sound, response)
Expand Down

0 comments on commit d2c6b5a

Please sign in to comment.