Skip to content
Browse files

Several fixes to specs (#827)

  • Loading branch information...
dazuma committed Sep 11, 2019
1 parent ab9f8f3 commit b03725cc4dab699979d318ea637baa80eb4e1754
Showing with 8 additions and 7 deletions.
  1. +8 −7 spec/google/apis/core/service_spec.rb
@@ -39,7 +39,7 @@

it 'should include os version in user agent' do
agent = service.send(:user_agent)
expect(agent).to match /#{Google::Apis::OS_VERSION}/
expect(agent).to match

it 'should inherit authorization' do
@@ -267,6 +267,7 @@

it 'should send nested multipart' do
Google::Apis::RequestOptions.default.authorization = 'a token'
service.batch_upload do |service|
command = service.send(:make_upload_command, :post, 'zoo/animals', {})
command.upload_source ='test')
@@ -276,16 +277,16 @@
expected_body = <<EOF.gsub(/\n/, "\r\n")
Content-Type: application/http
Content-Id: <b1981e17-f622-49af-b2eb-203308b1b17d+0>
Content-Length: 380
Content-Id: <b1981e17-f622-49af-b2eb-203308b1b17d\\+0>
Content-Length: \\d+
Content-Transfer-Encoding: binary
POST /upload/zoo/animals? HTTP/1.1
X-Goog-Api-Client: #{x_goog_api_client_value}
POST /upload/zoo/animals\\? HTTP/1\\.1
X-Goog-Api-Client: #{Regexp.escape(x_goog_api_client_value)}
Content-Type: multipart/related; boundary=inner
X-Goog-Upload-Protocol: multipart
Authorization: Bearer a token
Host: www\\.googleapis\\.com
Content-Type: application/json
@@ -303,7 +304,7 @@
expect(a_request(:put, '').with(body: expected_body)).to have_been_made
expect(a_request(:put, '').with(body: have_been_made

it 'should disallow downloads in batch' do

0 comments on commit b03725c

Please sign in to comment.
You can’t perform that action at this time.