'maxResults' => 20
}
})
- @request = @reference.to_request
+ @request = @reference.to_http_request
# Response stub
@response = stub("response")
}
END_OF_STRING
)
- @result = Google::APIClient::Result.new(@reference, @request, @response)
+ @result = Google::APIClient::Result.new(@reference, @response)
end
it 'should indicate a successful response' do
reference = @result.next_page
Hash[reference.parameters].should include('pageToken')
Hash[reference.parameters]['pageToken'].should == 'NEXT+PAGE+TOKEN'
- url = reference.to_request.to_env(Faraday.default_connection)[:url]
+ url = reference.to_http_request.to_env(Faraday.default_connection)[:url]
url.to_s.should include('pageToken=NEXT%2BPAGE%2BTOKEN')
end
}
END_OF_STRING
)
- @result = Google::APIClient::Result.new(@reference, @request, @response)
+ @result = Google::APIClient::Result.new(@reference, @response)
end
it 'should not return a next page token' do
END_OF_STRING
)
@response.stub(:status).and_return(400)
- @result = Google::APIClient::Result.new(@reference, @request, @response)
+ @result = Google::APIClient::Result.new(@reference, @response)
end
it 'should return error status correctly' do