Skip to content

Commit

Permalink
Merge pull request #459 from ryanseys/patch4lyfe
Browse files Browse the repository at this point in the history
Use PATCH when setting BigQuery dataset metadata
  • Loading branch information
stephenplusplus committed Mar 23, 2015
2 parents 5809f5e + 9a622a3 commit a419cc1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/bigquery/dataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ Dataset.prototype.query = function(options, callback) {
Dataset.prototype.setMetadata = function(metadata, callback) {
var that = this;

this.makeReq_('PUT', '', null, metadata, function(err, resp) {
this.makeReq_('PATCH', '', null, metadata, function(err, resp) {
if (err) {
callback(err);
return;
Expand Down
2 changes: 1 addition & 1 deletion test/bigquery/dataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ describe('BigQuery/Dataset', function() {

it('should send request to the api', function(done) {
ds.makeReq_ = function(method, path, query, body) {
assert.equal(method, 'PUT');
assert.equal(method, 'PATCH');
assert.equal(path, '');
assert.strictEqual(query, null);
assert.deepEqual(body, METADATA);
Expand Down

0 comments on commit a419cc1

Please sign in to comment.