diff --git a/request.js b/request.js index 18fb6ee..f609183 100644 --- a/request.js +++ b/request.js @@ -52,9 +52,6 @@ module.exports = function createClient(defaults) { if (typeof args === 'undefined') { args = {}; } - if (!defaults.api_key && !args.api_key) { - throw new Error('Missing required argument "api_key"'); - } return request(verb, 'https://api.flickr.com/services/rest') .query(defaults) diff --git a/script/build-tests.js b/script/build-tests.js index 8ac10ee..11da5d2 100644 --- a/script/build-tests.js +++ b/script/build-tests.js @@ -49,7 +49,7 @@ function requiredArguments(info) { var obj = {}; info.arguments.argument.filter(function (arg) { - return !parseInt(arg.optional, 10); + return !parseInt(arg.optional, 10) && arg.name !== 'api_key'; }).forEach(function (arg) { obj[arg.name] = '_'; }); diff --git a/test/flickr.activity.userComments.js b/test/flickr.activity.userComments.js index 0dc7fde..223c4a1 100644 --- a/test/flickr.activity.userComments.js +++ b/test/flickr.activity.userComments.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.activity.userComments', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.activity.userComments({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.activity.userComments({ api_key: '_' }); + var req = flickr.activity.userComments({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.activity.userPhotos.js b/test/flickr.activity.userPhotos.js index 3237254..e2ad55e 100644 --- a/test/flickr.activity.userPhotos.js +++ b/test/flickr.activity.userPhotos.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.activity.userPhotos', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.activity.userPhotos({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.activity.userPhotos({ api_key: '_' }); + var req = flickr.activity.userPhotos({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.auth.checkToken.js b/test/flickr.auth.checkToken.js index 3fa9533..1a3851d 100644 --- a/test/flickr.auth.checkToken.js +++ b/test/flickr.auth.checkToken.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.auth.checkToken', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.auth.checkToken({ auth_token: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "auth_token"', function () { assert.throws(function () { - flickr.auth.checkToken({ api_key: '_' }); + flickr.auth.checkToken({}); }, function (err) { return err.message === 'Missing required argument "auth_token"'; }); @@ -24,7 +14,7 @@ describe('flickr.auth.checkToken', function () { }); it('returns a Request instance', function () { - var req = flickr.auth.checkToken({ api_key: '_', auth_token: '_' }); + var req = flickr.auth.checkToken({ auth_token: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.auth.getFrob.js b/test/flickr.auth.getFrob.js index 794e66e..21413e4 100644 --- a/test/flickr.auth.getFrob.js +++ b/test/flickr.auth.getFrob.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.auth.getFrob', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.auth.getFrob({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.auth.getFrob({ api_key: '_' }); + var req = flickr.auth.getFrob({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.auth.getFullToken.js b/test/flickr.auth.getFullToken.js index 31f35e7..0a63859 100644 --- a/test/flickr.auth.getFullToken.js +++ b/test/flickr.auth.getFullToken.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.auth.getFullToken', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.auth.getFullToken({ mini_token: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "mini_token"', function () { assert.throws(function () { - flickr.auth.getFullToken({ api_key: '_' }); + flickr.auth.getFullToken({}); }, function (err) { return err.message === 'Missing required argument "mini_token"'; }); @@ -24,7 +14,7 @@ describe('flickr.auth.getFullToken', function () { }); it('returns a Request instance', function () { - var req = flickr.auth.getFullToken({ api_key: '_', mini_token: '_' }); + var req = flickr.auth.getFullToken({ mini_token: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.auth.getToken.js b/test/flickr.auth.getToken.js index 9e28f81..21c8c30 100644 --- a/test/flickr.auth.getToken.js +++ b/test/flickr.auth.getToken.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.auth.getToken', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.auth.getToken({ frob: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "frob"', function () { assert.throws(function () { - flickr.auth.getToken({ api_key: '_' }); + flickr.auth.getToken({}); }, function (err) { return err.message === 'Missing required argument "frob"'; }); @@ -24,7 +14,7 @@ describe('flickr.auth.getToken', function () { }); it('returns a Request instance', function () { - var req = flickr.auth.getToken({ api_key: '_', frob: '_' }); + var req = flickr.auth.getToken({ frob: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.auth.oauth.checkToken.js b/test/flickr.auth.oauth.checkToken.js index 331bfb5..3219b00 100644 --- a/test/flickr.auth.oauth.checkToken.js +++ b/test/flickr.auth.oauth.checkToken.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.auth.oauth.checkToken', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.auth.oauth.checkToken({ oauth_token: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "oauth_token"', function () { assert.throws(function () { - flickr.auth.oauth.checkToken({ api_key: '_' }); + flickr.auth.oauth.checkToken({}); }, function (err) { return err.message === 'Missing required argument "oauth_token"'; }); @@ -24,7 +14,7 @@ describe('flickr.auth.oauth.checkToken', function () { }); it('returns a Request instance', function () { - var req = flickr.auth.oauth.checkToken({ api_key: '_', oauth_token: '_' }); + var req = flickr.auth.oauth.checkToken({ oauth_token: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.auth.oauth.getAccessToken.js b/test/flickr.auth.oauth.getAccessToken.js index 6b82f9c..fe42cf7 100644 --- a/test/flickr.auth.oauth.getAccessToken.js +++ b/test/flickr.auth.oauth.getAccessToken.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.auth.oauth.getAccessToken', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.auth.oauth.getAccessToken({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.auth.oauth.getAccessToken({ api_key: '_' }); + var req = flickr.auth.oauth.getAccessToken({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.blogs.getList.js b/test/flickr.blogs.getList.js index 1c38f4e..4f2a9b4 100644 --- a/test/flickr.blogs.getList.js +++ b/test/flickr.blogs.getList.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.blogs.getList', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.blogs.getList({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.blogs.getList({ api_key: '_' }); + var req = flickr.blogs.getList({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.blogs.getServices.js b/test/flickr.blogs.getServices.js index 50aa24c..9593984 100644 --- a/test/flickr.blogs.getServices.js +++ b/test/flickr.blogs.getServices.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.blogs.getServices', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.blogs.getServices({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.blogs.getServices({ api_key: '_' }); + var req = flickr.blogs.getServices({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.blogs.postPhoto.js b/test/flickr.blogs.postPhoto.js index a46556a..10a1d95 100644 --- a/test/flickr.blogs.postPhoto.js +++ b/test/flickr.blogs.postPhoto.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.blogs.postPhoto', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.blogs.postPhoto({ photo_id: '_', title: '_', description: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.blogs.postPhoto({ api_key: '_', title: '_', description: '_' }); + flickr.blogs.postPhoto({ title: '_', description: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.blogs.postPhoto', function () { it('requires "title"', function () { assert.throws(function () { - flickr.blogs.postPhoto({ api_key: '_', photo_id: '_', description: '_' }); + flickr.blogs.postPhoto({ photo_id: '_', description: '_' }); }, function (err) { return err.message === 'Missing required argument "title"'; }); @@ -36,7 +26,7 @@ describe('flickr.blogs.postPhoto', function () { it('requires "description"', function () { assert.throws(function () { - flickr.blogs.postPhoto({ api_key: '_', photo_id: '_', title: '_' }); + flickr.blogs.postPhoto({ photo_id: '_', title: '_' }); }, function (err) { return err.message === 'Missing required argument "description"'; }); @@ -44,7 +34,7 @@ describe('flickr.blogs.postPhoto', function () { }); it('returns a Request instance', function () { - var req = flickr.blogs.postPhoto({ api_key: '_', photo_id: '_', title: '_', description: '_' }); + var req = flickr.blogs.postPhoto({ photo_id: '_', title: '_', description: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.cameras.getBrandModels.js b/test/flickr.cameras.getBrandModels.js index 18cf1e8..165f91b 100644 --- a/test/flickr.cameras.getBrandModels.js +++ b/test/flickr.cameras.getBrandModels.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.cameras.getBrandModels', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.cameras.getBrandModels({ brand: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "brand"', function () { assert.throws(function () { - flickr.cameras.getBrandModels({ api_key: '_' }); + flickr.cameras.getBrandModels({}); }, function (err) { return err.message === 'Missing required argument "brand"'; }); @@ -24,7 +14,7 @@ describe('flickr.cameras.getBrandModels', function () { }); it('returns a Request instance', function () { - var req = flickr.cameras.getBrandModels({ api_key: '_', brand: '_' }); + var req = flickr.cameras.getBrandModels({ brand: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.cameras.getBrands.js b/test/flickr.cameras.getBrands.js index 4db081c..eb4db3a 100644 --- a/test/flickr.cameras.getBrands.js +++ b/test/flickr.cameras.getBrands.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.cameras.getBrands', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.cameras.getBrands({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.cameras.getBrands({ api_key: '_' }); + var req = flickr.cameras.getBrands({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.collections.getInfo.js b/test/flickr.collections.getInfo.js index 86deb29..541c908 100644 --- a/test/flickr.collections.getInfo.js +++ b/test/flickr.collections.getInfo.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.collections.getInfo', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.collections.getInfo({ collection_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "collection_id"', function () { assert.throws(function () { - flickr.collections.getInfo({ api_key: '_' }); + flickr.collections.getInfo({}); }, function (err) { return err.message === 'Missing required argument "collection_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.collections.getInfo', function () { }); it('returns a Request instance', function () { - var req = flickr.collections.getInfo({ api_key: '_', collection_id: '_' }); + var req = flickr.collections.getInfo({ collection_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.collections.getTree.js b/test/flickr.collections.getTree.js index da2c925..088d45a 100644 --- a/test/flickr.collections.getTree.js +++ b/test/flickr.collections.getTree.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.collections.getTree', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.collections.getTree({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.collections.getTree({ api_key: '_' }); + var req = flickr.collections.getTree({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.commons.getInstitutions.js b/test/flickr.commons.getInstitutions.js index 377d823..efcc376 100644 --- a/test/flickr.commons.getInstitutions.js +++ b/test/flickr.commons.getInstitutions.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.commons.getInstitutions', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.commons.getInstitutions({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.commons.getInstitutions({ api_key: '_' }); + var req = flickr.commons.getInstitutions({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.contacts.getList.js b/test/flickr.contacts.getList.js index 2b53142..8ed7fd2 100644 --- a/test/flickr.contacts.getList.js +++ b/test/flickr.contacts.getList.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.contacts.getList', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.contacts.getList({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.contacts.getList({ api_key: '_' }); + var req = flickr.contacts.getList({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.contacts.getListRecentlyUploaded.js b/test/flickr.contacts.getListRecentlyUploaded.js index 7de6437..964cec7 100644 --- a/test/flickr.contacts.getListRecentlyUploaded.js +++ b/test/flickr.contacts.getListRecentlyUploaded.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.contacts.getListRecentlyUploaded', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.contacts.getListRecentlyUploaded({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.contacts.getListRecentlyUploaded({ api_key: '_' }); + var req = flickr.contacts.getListRecentlyUploaded({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.contacts.getPublicList.js b/test/flickr.contacts.getPublicList.js index 283df2e..8f81957 100644 --- a/test/flickr.contacts.getPublicList.js +++ b/test/flickr.contacts.getPublicList.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.contacts.getPublicList', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.contacts.getPublicList({ user_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "user_id"', function () { assert.throws(function () { - flickr.contacts.getPublicList({ api_key: '_' }); + flickr.contacts.getPublicList({}); }, function (err) { return err.message === 'Missing required argument "user_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.contacts.getPublicList', function () { }); it('returns a Request instance', function () { - var req = flickr.contacts.getPublicList({ api_key: '_', user_id: '_' }); + var req = flickr.contacts.getPublicList({ user_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.contacts.getTaggingSuggestions.js b/test/flickr.contacts.getTaggingSuggestions.js index 08be421..962c32a 100644 --- a/test/flickr.contacts.getTaggingSuggestions.js +++ b/test/flickr.contacts.getTaggingSuggestions.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.contacts.getTaggingSuggestions', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.contacts.getTaggingSuggestions({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.contacts.getTaggingSuggestions({ api_key: '_' }); + var req = flickr.contacts.getTaggingSuggestions({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.favorites.add.js b/test/flickr.favorites.add.js index f62bbc4..1918dd9 100644 --- a/test/flickr.favorites.add.js +++ b/test/flickr.favorites.add.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.favorites.add', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.favorites.add({ photo_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.favorites.add({ api_key: '_' }); + flickr.favorites.add({}); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.favorites.add', function () { }); it('returns a Request instance', function () { - var req = flickr.favorites.add({ api_key: '_', photo_id: '_' }); + var req = flickr.favorites.add({ photo_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.favorites.getContext.js b/test/flickr.favorites.getContext.js index b2ae540..fd93037 100644 --- a/test/flickr.favorites.getContext.js +++ b/test/flickr.favorites.getContext.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.favorites.getContext', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.favorites.getContext({ photo_id: '_', user_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.favorites.getContext({ api_key: '_', user_id: '_' }); + flickr.favorites.getContext({ user_id: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.favorites.getContext', function () { it('requires "user_id"', function () { assert.throws(function () { - flickr.favorites.getContext({ api_key: '_', photo_id: '_' }); + flickr.favorites.getContext({ photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "user_id"'; }); @@ -34,7 +24,7 @@ describe('flickr.favorites.getContext', function () { }); it('returns a Request instance', function () { - var req = flickr.favorites.getContext({ api_key: '_', photo_id: '_', user_id: '_' }); + var req = flickr.favorites.getContext({ photo_id: '_', user_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.favorites.getList.js b/test/flickr.favorites.getList.js index 7716dcc..c1dc750 100644 --- a/test/flickr.favorites.getList.js +++ b/test/flickr.favorites.getList.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.favorites.getList', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.favorites.getList({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.favorites.getList({ api_key: '_' }); + var req = flickr.favorites.getList({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.favorites.getPublicList.js b/test/flickr.favorites.getPublicList.js index 5ffc6f6..389f21a 100644 --- a/test/flickr.favorites.getPublicList.js +++ b/test/flickr.favorites.getPublicList.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.favorites.getPublicList', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.favorites.getPublicList({ user_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "user_id"', function () { assert.throws(function () { - flickr.favorites.getPublicList({ api_key: '_' }); + flickr.favorites.getPublicList({}); }, function (err) { return err.message === 'Missing required argument "user_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.favorites.getPublicList', function () { }); it('returns a Request instance', function () { - var req = flickr.favorites.getPublicList({ api_key: '_', user_id: '_' }); + var req = flickr.favorites.getPublicList({ user_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.favorites.remove.js b/test/flickr.favorites.remove.js index 10bbea7..7a87049 100644 --- a/test/flickr.favorites.remove.js +++ b/test/flickr.favorites.remove.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.favorites.remove', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.favorites.remove({ photo_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.favorites.remove({ api_key: '_' }); + flickr.favorites.remove({}); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.favorites.remove', function () { }); it('returns a Request instance', function () { - var req = flickr.favorites.remove({ api_key: '_', photo_id: '_' }); + var req = flickr.favorites.remove({ photo_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.galleries.addPhoto.js b/test/flickr.galleries.addPhoto.js index 406eaa4..5c3d770 100644 --- a/test/flickr.galleries.addPhoto.js +++ b/test/flickr.galleries.addPhoto.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.galleries.addPhoto', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.galleries.addPhoto({ gallery_id: '_', photo_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "gallery_id"', function () { assert.throws(function () { - flickr.galleries.addPhoto({ api_key: '_', photo_id: '_' }); + flickr.galleries.addPhoto({ photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "gallery_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.galleries.addPhoto', function () { it('requires "photo_id"', function () { assert.throws(function () { - flickr.galleries.addPhoto({ api_key: '_', gallery_id: '_' }); + flickr.galleries.addPhoto({ gallery_id: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -34,7 +24,7 @@ describe('flickr.galleries.addPhoto', function () { }); it('returns a Request instance', function () { - var req = flickr.galleries.addPhoto({ api_key: '_', gallery_id: '_', photo_id: '_' }); + var req = flickr.galleries.addPhoto({ gallery_id: '_', photo_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.galleries.create.js b/test/flickr.galleries.create.js index 51c26c5..f2d2335 100644 --- a/test/flickr.galleries.create.js +++ b/test/flickr.galleries.create.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.galleries.create', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.galleries.create({ title: '_', description: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "title"', function () { assert.throws(function () { - flickr.galleries.create({ api_key: '_', description: '_' }); + flickr.galleries.create({ description: '_' }); }, function (err) { return err.message === 'Missing required argument "title"'; }); @@ -26,7 +16,7 @@ describe('flickr.galleries.create', function () { it('requires "description"', function () { assert.throws(function () { - flickr.galleries.create({ api_key: '_', title: '_' }); + flickr.galleries.create({ title: '_' }); }, function (err) { return err.message === 'Missing required argument "description"'; }); @@ -34,7 +24,7 @@ describe('flickr.galleries.create', function () { }); it('returns a Request instance', function () { - var req = flickr.galleries.create({ api_key: '_', title: '_', description: '_' }); + var req = flickr.galleries.create({ title: '_', description: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.galleries.editMeta.js b/test/flickr.galleries.editMeta.js index 976dbed..dbccae9 100644 --- a/test/flickr.galleries.editMeta.js +++ b/test/flickr.galleries.editMeta.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.galleries.editMeta', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.galleries.editMeta({ gallery_id: '_', title: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "gallery_id"', function () { assert.throws(function () { - flickr.galleries.editMeta({ api_key: '_', title: '_' }); + flickr.galleries.editMeta({ title: '_' }); }, function (err) { return err.message === 'Missing required argument "gallery_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.galleries.editMeta', function () { it('requires "title"', function () { assert.throws(function () { - flickr.galleries.editMeta({ api_key: '_', gallery_id: '_' }); + flickr.galleries.editMeta({ gallery_id: '_' }); }, function (err) { return err.message === 'Missing required argument "title"'; }); @@ -34,7 +24,7 @@ describe('flickr.galleries.editMeta', function () { }); it('returns a Request instance', function () { - var req = flickr.galleries.editMeta({ api_key: '_', gallery_id: '_', title: '_' }); + var req = flickr.galleries.editMeta({ gallery_id: '_', title: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.galleries.editPhoto.js b/test/flickr.galleries.editPhoto.js index 90f2fde..2853f7a 100644 --- a/test/flickr.galleries.editPhoto.js +++ b/test/flickr.galleries.editPhoto.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.galleries.editPhoto', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.galleries.editPhoto({ gallery_id: '_', photo_id: '_', comment: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "gallery_id"', function () { assert.throws(function () { - flickr.galleries.editPhoto({ api_key: '_', photo_id: '_', comment: '_' }); + flickr.galleries.editPhoto({ photo_id: '_', comment: '_' }); }, function (err) { return err.message === 'Missing required argument "gallery_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.galleries.editPhoto', function () { it('requires "photo_id"', function () { assert.throws(function () { - flickr.galleries.editPhoto({ api_key: '_', gallery_id: '_', comment: '_' }); + flickr.galleries.editPhoto({ gallery_id: '_', comment: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -36,7 +26,7 @@ describe('flickr.galleries.editPhoto', function () { it('requires "comment"', function () { assert.throws(function () { - flickr.galleries.editPhoto({ api_key: '_', gallery_id: '_', photo_id: '_' }); + flickr.galleries.editPhoto({ gallery_id: '_', photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "comment"'; }); @@ -44,7 +34,7 @@ describe('flickr.galleries.editPhoto', function () { }); it('returns a Request instance', function () { - var req = flickr.galleries.editPhoto({ api_key: '_', gallery_id: '_', photo_id: '_', comment: '_' }); + var req = flickr.galleries.editPhoto({ gallery_id: '_', photo_id: '_', comment: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.galleries.editPhotos.js b/test/flickr.galleries.editPhotos.js index 5a8a853..6c5e6c1 100644 --- a/test/flickr.galleries.editPhotos.js +++ b/test/flickr.galleries.editPhotos.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.galleries.editPhotos', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.galleries.editPhotos({ gallery_id: '_', primary_photo_id: '_', photo_ids: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "gallery_id"', function () { assert.throws(function () { - flickr.galleries.editPhotos({ api_key: '_', primary_photo_id: '_', photo_ids: '_' }); + flickr.galleries.editPhotos({ primary_photo_id: '_', photo_ids: '_' }); }, function (err) { return err.message === 'Missing required argument "gallery_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.galleries.editPhotos', function () { it('requires "primary_photo_id"', function () { assert.throws(function () { - flickr.galleries.editPhotos({ api_key: '_', gallery_id: '_', photo_ids: '_' }); + flickr.galleries.editPhotos({ gallery_id: '_', photo_ids: '_' }); }, function (err) { return err.message === 'Missing required argument "primary_photo_id"'; }); @@ -36,7 +26,7 @@ describe('flickr.galleries.editPhotos', function () { it('requires "photo_ids"', function () { assert.throws(function () { - flickr.galleries.editPhotos({ api_key: '_', gallery_id: '_', primary_photo_id: '_' }); + flickr.galleries.editPhotos({ gallery_id: '_', primary_photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_ids"'; }); @@ -44,10 +34,7 @@ describe('flickr.galleries.editPhotos', function () { }); it('returns a Request instance', function () { - var req = flickr.galleries.editPhotos({ api_key: '_', - gallery_id: '_', - primary_photo_id: '_', - photo_ids: '_' }); + var req = flickr.galleries.editPhotos({ gallery_id: '_', primary_photo_id: '_', photo_ids: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.galleries.getInfo.js b/test/flickr.galleries.getInfo.js index 5602175..88fa634 100644 --- a/test/flickr.galleries.getInfo.js +++ b/test/flickr.galleries.getInfo.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.galleries.getInfo', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.galleries.getInfo({ gallery_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "gallery_id"', function () { assert.throws(function () { - flickr.galleries.getInfo({ api_key: '_' }); + flickr.galleries.getInfo({}); }, function (err) { return err.message === 'Missing required argument "gallery_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.galleries.getInfo', function () { }); it('returns a Request instance', function () { - var req = flickr.galleries.getInfo({ api_key: '_', gallery_id: '_' }); + var req = flickr.galleries.getInfo({ gallery_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.galleries.getList.js b/test/flickr.galleries.getList.js index 4073078..6a1baa0 100644 --- a/test/flickr.galleries.getList.js +++ b/test/flickr.galleries.getList.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.galleries.getList', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.galleries.getList({ user_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "user_id"', function () { assert.throws(function () { - flickr.galleries.getList({ api_key: '_' }); + flickr.galleries.getList({}); }, function (err) { return err.message === 'Missing required argument "user_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.galleries.getList', function () { }); it('returns a Request instance', function () { - var req = flickr.galleries.getList({ api_key: '_', user_id: '_' }); + var req = flickr.galleries.getList({ user_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.galleries.getListForPhoto.js b/test/flickr.galleries.getListForPhoto.js index 83c8940..9986fe5 100644 --- a/test/flickr.galleries.getListForPhoto.js +++ b/test/flickr.galleries.getListForPhoto.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.galleries.getListForPhoto', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.galleries.getListForPhoto({ photo_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.galleries.getListForPhoto({ api_key: '_' }); + flickr.galleries.getListForPhoto({}); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.galleries.getListForPhoto', function () { }); it('returns a Request instance', function () { - var req = flickr.galleries.getListForPhoto({ api_key: '_', photo_id: '_' }); + var req = flickr.galleries.getListForPhoto({ photo_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.galleries.getPhotos.js b/test/flickr.galleries.getPhotos.js index 0185d2b..67b0d83 100644 --- a/test/flickr.galleries.getPhotos.js +++ b/test/flickr.galleries.getPhotos.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.galleries.getPhotos', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.galleries.getPhotos({ gallery_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "gallery_id"', function () { assert.throws(function () { - flickr.galleries.getPhotos({ api_key: '_' }); + flickr.galleries.getPhotos({}); }, function (err) { return err.message === 'Missing required argument "gallery_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.galleries.getPhotos', function () { }); it('returns a Request instance', function () { - var req = flickr.galleries.getPhotos({ api_key: '_', gallery_id: '_' }); + var req = flickr.galleries.getPhotos({ gallery_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.groups.browse.js b/test/flickr.groups.browse.js index b2e2810..d9f082c 100644 --- a/test/flickr.groups.browse.js +++ b/test/flickr.groups.browse.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.groups.browse', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.groups.browse({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.groups.browse({ api_key: '_' }); + var req = flickr.groups.browse({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.groups.discuss.replies.add.js b/test/flickr.groups.discuss.replies.add.js index 6fcb6b8..e04462a 100644 --- a/test/flickr.groups.discuss.replies.add.js +++ b/test/flickr.groups.discuss.replies.add.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.groups.discuss.replies.add', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.groups.discuss.replies.add({ group_id: '_', topic_id: '_', message: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "group_id"', function () { assert.throws(function () { - flickr.groups.discuss.replies.add({ api_key: '_', topic_id: '_', message: '_' }); + flickr.groups.discuss.replies.add({ topic_id: '_', message: '_' }); }, function (err) { return err.message === 'Missing required argument "group_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.groups.discuss.replies.add', function () { it('requires "topic_id"', function () { assert.throws(function () { - flickr.groups.discuss.replies.add({ api_key: '_', group_id: '_', message: '_' }); + flickr.groups.discuss.replies.add({ group_id: '_', message: '_' }); }, function (err) { return err.message === 'Missing required argument "topic_id"'; }); @@ -36,7 +26,7 @@ describe('flickr.groups.discuss.replies.add', function () { it('requires "message"', function () { assert.throws(function () { - flickr.groups.discuss.replies.add({ api_key: '_', group_id: '_', topic_id: '_' }); + flickr.groups.discuss.replies.add({ group_id: '_', topic_id: '_' }); }, function (err) { return err.message === 'Missing required argument "message"'; }); @@ -44,7 +34,7 @@ describe('flickr.groups.discuss.replies.add', function () { }); it('returns a Request instance', function () { - var req = flickr.groups.discuss.replies.add({ api_key: '_', group_id: '_', topic_id: '_', message: '_' }); + var req = flickr.groups.discuss.replies.add({ group_id: '_', topic_id: '_', message: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.groups.discuss.replies.delete.js b/test/flickr.groups.discuss.replies.delete.js index 16efb58..f05ade0 100644 --- a/test/flickr.groups.discuss.replies.delete.js +++ b/test/flickr.groups.discuss.replies.delete.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.groups.discuss.replies.delete', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.groups.discuss.replies.delete({ group_id: '_', topic_id: '_', reply_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "group_id"', function () { assert.throws(function () { - flickr.groups.discuss.replies.delete({ api_key: '_', topic_id: '_', reply_id: '_' }); + flickr.groups.discuss.replies.delete({ topic_id: '_', reply_id: '_' }); }, function (err) { return err.message === 'Missing required argument "group_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.groups.discuss.replies.delete', function () { it('requires "topic_id"', function () { assert.throws(function () { - flickr.groups.discuss.replies.delete({ api_key: '_', group_id: '_', reply_id: '_' }); + flickr.groups.discuss.replies.delete({ group_id: '_', reply_id: '_' }); }, function (err) { return err.message === 'Missing required argument "topic_id"'; }); @@ -36,7 +26,7 @@ describe('flickr.groups.discuss.replies.delete', function () { it('requires "reply_id"', function () { assert.throws(function () { - flickr.groups.discuss.replies.delete({ api_key: '_', group_id: '_', topic_id: '_' }); + flickr.groups.discuss.replies.delete({ group_id: '_', topic_id: '_' }); }, function (err) { return err.message === 'Missing required argument "reply_id"'; }); @@ -44,7 +34,7 @@ describe('flickr.groups.discuss.replies.delete', function () { }); it('returns a Request instance', function () { - var req = flickr.groups.discuss.replies.delete({ api_key: '_', group_id: '_', topic_id: '_', reply_id: '_' }); + var req = flickr.groups.discuss.replies.delete({ group_id: '_', topic_id: '_', reply_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.groups.discuss.replies.edit.js b/test/flickr.groups.discuss.replies.edit.js index 6cfa8cc..c73feb5 100644 --- a/test/flickr.groups.discuss.replies.edit.js +++ b/test/flickr.groups.discuss.replies.edit.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.groups.discuss.replies.edit', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.groups.discuss.replies.edit({ group_id: '_', topic_id: '_', reply_id: '_', message: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "group_id"', function () { assert.throws(function () { - flickr.groups.discuss.replies.edit({ api_key: '_', topic_id: '_', reply_id: '_', message: '_' }); + flickr.groups.discuss.replies.edit({ topic_id: '_', reply_id: '_', message: '_' }); }, function (err) { return err.message === 'Missing required argument "group_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.groups.discuss.replies.edit', function () { it('requires "topic_id"', function () { assert.throws(function () { - flickr.groups.discuss.replies.edit({ api_key: '_', group_id: '_', reply_id: '_', message: '_' }); + flickr.groups.discuss.replies.edit({ group_id: '_', reply_id: '_', message: '_' }); }, function (err) { return err.message === 'Missing required argument "topic_id"'; }); @@ -36,7 +26,7 @@ describe('flickr.groups.discuss.replies.edit', function () { it('requires "reply_id"', function () { assert.throws(function () { - flickr.groups.discuss.replies.edit({ api_key: '_', group_id: '_', topic_id: '_', message: '_' }); + flickr.groups.discuss.replies.edit({ group_id: '_', topic_id: '_', message: '_' }); }, function (err) { return err.message === 'Missing required argument "reply_id"'; }); @@ -46,7 +36,7 @@ describe('flickr.groups.discuss.replies.edit', function () { it('requires "message"', function () { assert.throws(function () { - flickr.groups.discuss.replies.edit({ api_key: '_', group_id: '_', topic_id: '_', reply_id: '_' }); + flickr.groups.discuss.replies.edit({ group_id: '_', topic_id: '_', reply_id: '_' }); }, function (err) { return err.message === 'Missing required argument "message"'; }); @@ -54,11 +44,7 @@ describe('flickr.groups.discuss.replies.edit', function () { }); it('returns a Request instance', function () { - var req = flickr.groups.discuss.replies.edit({ api_key: '_', - group_id: '_', - topic_id: '_', - reply_id: '_', - message: '_' }); + var req = flickr.groups.discuss.replies.edit({ group_id: '_', topic_id: '_', reply_id: '_', message: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.groups.discuss.replies.getInfo.js b/test/flickr.groups.discuss.replies.getInfo.js index 4aa930f..5e5503a 100644 --- a/test/flickr.groups.discuss.replies.getInfo.js +++ b/test/flickr.groups.discuss.replies.getInfo.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.groups.discuss.replies.getInfo', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.groups.discuss.replies.getInfo({ group_id: '_', topic_id: '_', reply_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "group_id"', function () { assert.throws(function () { - flickr.groups.discuss.replies.getInfo({ api_key: '_', topic_id: '_', reply_id: '_' }); + flickr.groups.discuss.replies.getInfo({ topic_id: '_', reply_id: '_' }); }, function (err) { return err.message === 'Missing required argument "group_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.groups.discuss.replies.getInfo', function () { it('requires "topic_id"', function () { assert.throws(function () { - flickr.groups.discuss.replies.getInfo({ api_key: '_', group_id: '_', reply_id: '_' }); + flickr.groups.discuss.replies.getInfo({ group_id: '_', reply_id: '_' }); }, function (err) { return err.message === 'Missing required argument "topic_id"'; }); @@ -36,7 +26,7 @@ describe('flickr.groups.discuss.replies.getInfo', function () { it('requires "reply_id"', function () { assert.throws(function () { - flickr.groups.discuss.replies.getInfo({ api_key: '_', group_id: '_', topic_id: '_' }); + flickr.groups.discuss.replies.getInfo({ group_id: '_', topic_id: '_' }); }, function (err) { return err.message === 'Missing required argument "reply_id"'; }); @@ -44,7 +34,7 @@ describe('flickr.groups.discuss.replies.getInfo', function () { }); it('returns a Request instance', function () { - var req = flickr.groups.discuss.replies.getInfo({ api_key: '_', group_id: '_', topic_id: '_', reply_id: '_' }); + var req = flickr.groups.discuss.replies.getInfo({ group_id: '_', topic_id: '_', reply_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.groups.discuss.replies.getList.js b/test/flickr.groups.discuss.replies.getList.js index 78e9c4d..3ca9e9f 100644 --- a/test/flickr.groups.discuss.replies.getList.js +++ b/test/flickr.groups.discuss.replies.getList.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.groups.discuss.replies.getList', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.groups.discuss.replies.getList({ group_id: '_', topic_id: '_', per_page: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "group_id"', function () { assert.throws(function () { - flickr.groups.discuss.replies.getList({ api_key: '_', topic_id: '_', per_page: '_' }); + flickr.groups.discuss.replies.getList({ topic_id: '_', per_page: '_' }); }, function (err) { return err.message === 'Missing required argument "group_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.groups.discuss.replies.getList', function () { it('requires "topic_id"', function () { assert.throws(function () { - flickr.groups.discuss.replies.getList({ api_key: '_', group_id: '_', per_page: '_' }); + flickr.groups.discuss.replies.getList({ group_id: '_', per_page: '_' }); }, function (err) { return err.message === 'Missing required argument "topic_id"'; }); @@ -36,7 +26,7 @@ describe('flickr.groups.discuss.replies.getList', function () { it('requires "per_page"', function () { assert.throws(function () { - flickr.groups.discuss.replies.getList({ api_key: '_', group_id: '_', topic_id: '_' }); + flickr.groups.discuss.replies.getList({ group_id: '_', topic_id: '_' }); }, function (err) { return err.message === 'Missing required argument "per_page"'; }); @@ -44,7 +34,7 @@ describe('flickr.groups.discuss.replies.getList', function () { }); it('returns a Request instance', function () { - var req = flickr.groups.discuss.replies.getList({ api_key: '_', group_id: '_', topic_id: '_', per_page: '_' }); + var req = flickr.groups.discuss.replies.getList({ group_id: '_', topic_id: '_', per_page: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.groups.discuss.topics.add.js b/test/flickr.groups.discuss.topics.add.js index 048c1ae..c5a1faa 100644 --- a/test/flickr.groups.discuss.topics.add.js +++ b/test/flickr.groups.discuss.topics.add.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.groups.discuss.topics.add', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.groups.discuss.topics.add({ group_id: '_', subject: '_', message: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "group_id"', function () { assert.throws(function () { - flickr.groups.discuss.topics.add({ api_key: '_', subject: '_', message: '_' }); + flickr.groups.discuss.topics.add({ subject: '_', message: '_' }); }, function (err) { return err.message === 'Missing required argument "group_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.groups.discuss.topics.add', function () { it('requires "subject"', function () { assert.throws(function () { - flickr.groups.discuss.topics.add({ api_key: '_', group_id: '_', message: '_' }); + flickr.groups.discuss.topics.add({ group_id: '_', message: '_' }); }, function (err) { return err.message === 'Missing required argument "subject"'; }); @@ -36,7 +26,7 @@ describe('flickr.groups.discuss.topics.add', function () { it('requires "message"', function () { assert.throws(function () { - flickr.groups.discuss.topics.add({ api_key: '_', group_id: '_', subject: '_' }); + flickr.groups.discuss.topics.add({ group_id: '_', subject: '_' }); }, function (err) { return err.message === 'Missing required argument "message"'; }); @@ -44,7 +34,7 @@ describe('flickr.groups.discuss.topics.add', function () { }); it('returns a Request instance', function () { - var req = flickr.groups.discuss.topics.add({ api_key: '_', group_id: '_', subject: '_', message: '_' }); + var req = flickr.groups.discuss.topics.add({ group_id: '_', subject: '_', message: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.groups.discuss.topics.getInfo.js b/test/flickr.groups.discuss.topics.getInfo.js index 86ad6b3..1c3bda8 100644 --- a/test/flickr.groups.discuss.topics.getInfo.js +++ b/test/flickr.groups.discuss.topics.getInfo.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.groups.discuss.topics.getInfo', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.groups.discuss.topics.getInfo({ group_id: '_', topic_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "group_id"', function () { assert.throws(function () { - flickr.groups.discuss.topics.getInfo({ api_key: '_', topic_id: '_' }); + flickr.groups.discuss.topics.getInfo({ topic_id: '_' }); }, function (err) { return err.message === 'Missing required argument "group_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.groups.discuss.topics.getInfo', function () { it('requires "topic_id"', function () { assert.throws(function () { - flickr.groups.discuss.topics.getInfo({ api_key: '_', group_id: '_' }); + flickr.groups.discuss.topics.getInfo({ group_id: '_' }); }, function (err) { return err.message === 'Missing required argument "topic_id"'; }); @@ -34,7 +24,7 @@ describe('flickr.groups.discuss.topics.getInfo', function () { }); it('returns a Request instance', function () { - var req = flickr.groups.discuss.topics.getInfo({ api_key: '_', group_id: '_', topic_id: '_' }); + var req = flickr.groups.discuss.topics.getInfo({ group_id: '_', topic_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.groups.discuss.topics.getList.js b/test/flickr.groups.discuss.topics.getList.js index d28c2e3..06b9526 100644 --- a/test/flickr.groups.discuss.topics.getList.js +++ b/test/flickr.groups.discuss.topics.getList.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.groups.discuss.topics.getList', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.groups.discuss.topics.getList({ group_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "group_id"', function () { assert.throws(function () { - flickr.groups.discuss.topics.getList({ api_key: '_' }); + flickr.groups.discuss.topics.getList({}); }, function (err) { return err.message === 'Missing required argument "group_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.groups.discuss.topics.getList', function () { }); it('returns a Request instance', function () { - var req = flickr.groups.discuss.topics.getList({ api_key: '_', group_id: '_' }); + var req = flickr.groups.discuss.topics.getList({ group_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.groups.getInfo.js b/test/flickr.groups.getInfo.js index 38120d4..fcf2453 100644 --- a/test/flickr.groups.getInfo.js +++ b/test/flickr.groups.getInfo.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.groups.getInfo', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.groups.getInfo({ group_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "group_id"', function () { assert.throws(function () { - flickr.groups.getInfo({ api_key: '_' }); + flickr.groups.getInfo({}); }, function (err) { return err.message === 'Missing required argument "group_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.groups.getInfo', function () { }); it('returns a Request instance', function () { - var req = flickr.groups.getInfo({ api_key: '_', group_id: '_' }); + var req = flickr.groups.getInfo({ group_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.groups.join.js b/test/flickr.groups.join.js index 8605cee..06ab791 100644 --- a/test/flickr.groups.join.js +++ b/test/flickr.groups.join.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.groups.join', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.groups.join({ group_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "group_id"', function () { assert.throws(function () { - flickr.groups.join({ api_key: '_' }); + flickr.groups.join({}); }, function (err) { return err.message === 'Missing required argument "group_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.groups.join', function () { }); it('returns a Request instance', function () { - var req = flickr.groups.join({ api_key: '_', group_id: '_' }); + var req = flickr.groups.join({ group_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.groups.joinRequest.js b/test/flickr.groups.joinRequest.js index a9c5743..04e2ecf 100644 --- a/test/flickr.groups.joinRequest.js +++ b/test/flickr.groups.joinRequest.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.groups.joinRequest', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.groups.joinRequest({ group_id: '_', message: '_', accept_rules: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "group_id"', function () { assert.throws(function () { - flickr.groups.joinRequest({ api_key: '_', message: '_', accept_rules: '_' }); + flickr.groups.joinRequest({ message: '_', accept_rules: '_' }); }, function (err) { return err.message === 'Missing required argument "group_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.groups.joinRequest', function () { it('requires "message"', function () { assert.throws(function () { - flickr.groups.joinRequest({ api_key: '_', group_id: '_', accept_rules: '_' }); + flickr.groups.joinRequest({ group_id: '_', accept_rules: '_' }); }, function (err) { return err.message === 'Missing required argument "message"'; }); @@ -36,7 +26,7 @@ describe('flickr.groups.joinRequest', function () { it('requires "accept_rules"', function () { assert.throws(function () { - flickr.groups.joinRequest({ api_key: '_', group_id: '_', message: '_' }); + flickr.groups.joinRequest({ group_id: '_', message: '_' }); }, function (err) { return err.message === 'Missing required argument "accept_rules"'; }); @@ -44,7 +34,7 @@ describe('flickr.groups.joinRequest', function () { }); it('returns a Request instance', function () { - var req = flickr.groups.joinRequest({ api_key: '_', group_id: '_', message: '_', accept_rules: '_' }); + var req = flickr.groups.joinRequest({ group_id: '_', message: '_', accept_rules: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.groups.leave.js b/test/flickr.groups.leave.js index 4bbecf4..964eb51 100644 --- a/test/flickr.groups.leave.js +++ b/test/flickr.groups.leave.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.groups.leave', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.groups.leave({ group_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "group_id"', function () { assert.throws(function () { - flickr.groups.leave({ api_key: '_' }); + flickr.groups.leave({}); }, function (err) { return err.message === 'Missing required argument "group_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.groups.leave', function () { }); it('returns a Request instance', function () { - var req = flickr.groups.leave({ api_key: '_', group_id: '_' }); + var req = flickr.groups.leave({ group_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.groups.members.getList.js b/test/flickr.groups.members.getList.js index 84d6fdf..0a6f873 100644 --- a/test/flickr.groups.members.getList.js +++ b/test/flickr.groups.members.getList.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.groups.members.getList', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.groups.members.getList({ group_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "group_id"', function () { assert.throws(function () { - flickr.groups.members.getList({ api_key: '_' }); + flickr.groups.members.getList({}); }, function (err) { return err.message === 'Missing required argument "group_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.groups.members.getList', function () { }); it('returns a Request instance', function () { - var req = flickr.groups.members.getList({ api_key: '_', group_id: '_' }); + var req = flickr.groups.members.getList({ group_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.groups.pools.add.js b/test/flickr.groups.pools.add.js index 3df8a38..91c50ba 100644 --- a/test/flickr.groups.pools.add.js +++ b/test/flickr.groups.pools.add.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.groups.pools.add', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.groups.pools.add({ photo_id: '_', group_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.groups.pools.add({ api_key: '_', group_id: '_' }); + flickr.groups.pools.add({ group_id: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.groups.pools.add', function () { it('requires "group_id"', function () { assert.throws(function () { - flickr.groups.pools.add({ api_key: '_', photo_id: '_' }); + flickr.groups.pools.add({ photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "group_id"'; }); @@ -34,7 +24,7 @@ describe('flickr.groups.pools.add', function () { }); it('returns a Request instance', function () { - var req = flickr.groups.pools.add({ api_key: '_', photo_id: '_', group_id: '_' }); + var req = flickr.groups.pools.add({ photo_id: '_', group_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.groups.pools.getContext.js b/test/flickr.groups.pools.getContext.js index 2725dfd..f9faa7e 100644 --- a/test/flickr.groups.pools.getContext.js +++ b/test/flickr.groups.pools.getContext.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.groups.pools.getContext', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.groups.pools.getContext({ photo_id: '_', group_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.groups.pools.getContext({ api_key: '_', group_id: '_' }); + flickr.groups.pools.getContext({ group_id: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.groups.pools.getContext', function () { it('requires "group_id"', function () { assert.throws(function () { - flickr.groups.pools.getContext({ api_key: '_', photo_id: '_' }); + flickr.groups.pools.getContext({ photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "group_id"'; }); @@ -34,7 +24,7 @@ describe('flickr.groups.pools.getContext', function () { }); it('returns a Request instance', function () { - var req = flickr.groups.pools.getContext({ api_key: '_', photo_id: '_', group_id: '_' }); + var req = flickr.groups.pools.getContext({ photo_id: '_', group_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.groups.pools.getGroups.js b/test/flickr.groups.pools.getGroups.js index 5e329d5..f2bac3c 100644 --- a/test/flickr.groups.pools.getGroups.js +++ b/test/flickr.groups.pools.getGroups.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.groups.pools.getGroups', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.groups.pools.getGroups({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.groups.pools.getGroups({ api_key: '_' }); + var req = flickr.groups.pools.getGroups({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.groups.pools.getPhotos.js b/test/flickr.groups.pools.getPhotos.js index 9e28262..f937511 100644 --- a/test/flickr.groups.pools.getPhotos.js +++ b/test/flickr.groups.pools.getPhotos.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.groups.pools.getPhotos', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.groups.pools.getPhotos({ group_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "group_id"', function () { assert.throws(function () { - flickr.groups.pools.getPhotos({ api_key: '_' }); + flickr.groups.pools.getPhotos({}); }, function (err) { return err.message === 'Missing required argument "group_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.groups.pools.getPhotos', function () { }); it('returns a Request instance', function () { - var req = flickr.groups.pools.getPhotos({ api_key: '_', group_id: '_' }); + var req = flickr.groups.pools.getPhotos({ group_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.groups.pools.remove.js b/test/flickr.groups.pools.remove.js index a82755a..eb89c1c 100644 --- a/test/flickr.groups.pools.remove.js +++ b/test/flickr.groups.pools.remove.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.groups.pools.remove', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.groups.pools.remove({ photo_id: '_', group_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.groups.pools.remove({ api_key: '_', group_id: '_' }); + flickr.groups.pools.remove({ group_id: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.groups.pools.remove', function () { it('requires "group_id"', function () { assert.throws(function () { - flickr.groups.pools.remove({ api_key: '_', photo_id: '_' }); + flickr.groups.pools.remove({ photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "group_id"'; }); @@ -34,7 +24,7 @@ describe('flickr.groups.pools.remove', function () { }); it('returns a Request instance', function () { - var req = flickr.groups.pools.remove({ api_key: '_', photo_id: '_', group_id: '_' }); + var req = flickr.groups.pools.remove({ photo_id: '_', group_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.groups.search.js b/test/flickr.groups.search.js index 6ee7e7c..1a59959 100644 --- a/test/flickr.groups.search.js +++ b/test/flickr.groups.search.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.groups.search', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.groups.search({ text: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "text"', function () { assert.throws(function () { - flickr.groups.search({ api_key: '_' }); + flickr.groups.search({}); }, function (err) { return err.message === 'Missing required argument "text"'; }); @@ -24,7 +14,7 @@ describe('flickr.groups.search', function () { }); it('returns a Request instance', function () { - var req = flickr.groups.search({ api_key: '_', text: '_' }); + var req = flickr.groups.search({ text: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.interestingness.getList.js b/test/flickr.interestingness.getList.js index e7860ed..3398402 100644 --- a/test/flickr.interestingness.getList.js +++ b/test/flickr.interestingness.getList.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.interestingness.getList', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.interestingness.getList({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.interestingness.getList({ api_key: '_' }); + var req = flickr.interestingness.getList({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.machinetags.getNamespaces.js b/test/flickr.machinetags.getNamespaces.js index 3524b9c..f629e7d 100644 --- a/test/flickr.machinetags.getNamespaces.js +++ b/test/flickr.machinetags.getNamespaces.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.machinetags.getNamespaces', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.machinetags.getNamespaces({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.machinetags.getNamespaces({ api_key: '_' }); + var req = flickr.machinetags.getNamespaces({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.machinetags.getPairs.js b/test/flickr.machinetags.getPairs.js index 94d13b4..d70cf77 100644 --- a/test/flickr.machinetags.getPairs.js +++ b/test/flickr.machinetags.getPairs.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.machinetags.getPairs', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.machinetags.getPairs({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.machinetags.getPairs({ api_key: '_' }); + var req = flickr.machinetags.getPairs({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.machinetags.getPredicates.js b/test/flickr.machinetags.getPredicates.js index 711f77b..e75c36e 100644 --- a/test/flickr.machinetags.getPredicates.js +++ b/test/flickr.machinetags.getPredicates.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.machinetags.getPredicates', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.machinetags.getPredicates({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.machinetags.getPredicates({ api_key: '_' }); + var req = flickr.machinetags.getPredicates({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.machinetags.getRecentValues.js b/test/flickr.machinetags.getRecentValues.js index ad202a3..9f893c6 100644 --- a/test/flickr.machinetags.getRecentValues.js +++ b/test/flickr.machinetags.getRecentValues.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.machinetags.getRecentValues', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.machinetags.getRecentValues({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.machinetags.getRecentValues({ api_key: '_' }); + var req = flickr.machinetags.getRecentValues({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.machinetags.getValues.js b/test/flickr.machinetags.getValues.js index d4299c1..3fe86b5 100644 --- a/test/flickr.machinetags.getValues.js +++ b/test/flickr.machinetags.getValues.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.machinetags.getValues', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.machinetags.getValues({ namespace: '_', predicate: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "namespace"', function () { assert.throws(function () { - flickr.machinetags.getValues({ api_key: '_', predicate: '_' }); + flickr.machinetags.getValues({ predicate: '_' }); }, function (err) { return err.message === 'Missing required argument "namespace"'; }); @@ -26,7 +16,7 @@ describe('flickr.machinetags.getValues', function () { it('requires "predicate"', function () { assert.throws(function () { - flickr.machinetags.getValues({ api_key: '_', namespace: '_' }); + flickr.machinetags.getValues({ namespace: '_' }); }, function (err) { return err.message === 'Missing required argument "predicate"'; }); @@ -34,7 +24,7 @@ describe('flickr.machinetags.getValues', function () { }); it('returns a Request instance', function () { - var req = flickr.machinetags.getValues({ api_key: '_', namespace: '_', predicate: '_' }); + var req = flickr.machinetags.getValues({ namespace: '_', predicate: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.panda.getList.js b/test/flickr.panda.getList.js index be96f99..bef4c88 100644 --- a/test/flickr.panda.getList.js +++ b/test/flickr.panda.getList.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.panda.getList', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.panda.getList({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.panda.getList({ api_key: '_' }); + var req = flickr.panda.getList({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.panda.getPhotos.js b/test/flickr.panda.getPhotos.js index ea29f4c..1a48ec2 100644 --- a/test/flickr.panda.getPhotos.js +++ b/test/flickr.panda.getPhotos.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.panda.getPhotos', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.panda.getPhotos({ panda_name: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "panda_name"', function () { assert.throws(function () { - flickr.panda.getPhotos({ api_key: '_' }); + flickr.panda.getPhotos({}); }, function (err) { return err.message === 'Missing required argument "panda_name"'; }); @@ -24,7 +14,7 @@ describe('flickr.panda.getPhotos', function () { }); it('returns a Request instance', function () { - var req = flickr.panda.getPhotos({ api_key: '_', panda_name: '_' }); + var req = flickr.panda.getPhotos({ panda_name: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.people.findByEmail.js b/test/flickr.people.findByEmail.js index 80ea7dd..987c8e1 100644 --- a/test/flickr.people.findByEmail.js +++ b/test/flickr.people.findByEmail.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.people.findByEmail', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.people.findByEmail({ find_email: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "find_email"', function () { assert.throws(function () { - flickr.people.findByEmail({ api_key: '_' }); + flickr.people.findByEmail({}); }, function (err) { return err.message === 'Missing required argument "find_email"'; }); @@ -24,7 +14,7 @@ describe('flickr.people.findByEmail', function () { }); it('returns a Request instance', function () { - var req = flickr.people.findByEmail({ api_key: '_', find_email: '_' }); + var req = flickr.people.findByEmail({ find_email: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.people.findByUsername.js b/test/flickr.people.findByUsername.js index de42f0c..02b4284 100644 --- a/test/flickr.people.findByUsername.js +++ b/test/flickr.people.findByUsername.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.people.findByUsername', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.people.findByUsername({ username: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "username"', function () { assert.throws(function () { - flickr.people.findByUsername({ api_key: '_' }); + flickr.people.findByUsername({}); }, function (err) { return err.message === 'Missing required argument "username"'; }); @@ -24,7 +14,7 @@ describe('flickr.people.findByUsername', function () { }); it('returns a Request instance', function () { - var req = flickr.people.findByUsername({ api_key: '_', username: '_' }); + var req = flickr.people.findByUsername({ username: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.people.getGroups.js b/test/flickr.people.getGroups.js index 0e740d5..9477049 100644 --- a/test/flickr.people.getGroups.js +++ b/test/flickr.people.getGroups.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.people.getGroups', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.people.getGroups({ user_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "user_id"', function () { assert.throws(function () { - flickr.people.getGroups({ api_key: '_' }); + flickr.people.getGroups({}); }, function (err) { return err.message === 'Missing required argument "user_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.people.getGroups', function () { }); it('returns a Request instance', function () { - var req = flickr.people.getGroups({ api_key: '_', user_id: '_' }); + var req = flickr.people.getGroups({ user_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.people.getInfo.js b/test/flickr.people.getInfo.js index eba169c..449b4d5 100644 --- a/test/flickr.people.getInfo.js +++ b/test/flickr.people.getInfo.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.people.getInfo', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.people.getInfo({ user_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "user_id"', function () { assert.throws(function () { - flickr.people.getInfo({ api_key: '_' }); + flickr.people.getInfo({}); }, function (err) { return err.message === 'Missing required argument "user_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.people.getInfo', function () { }); it('returns a Request instance', function () { - var req = flickr.people.getInfo({ api_key: '_', user_id: '_' }); + var req = flickr.people.getInfo({ user_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.people.getLimits.js b/test/flickr.people.getLimits.js index bef0299..cb32e49 100644 --- a/test/flickr.people.getLimits.js +++ b/test/flickr.people.getLimits.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.people.getLimits', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.people.getLimits({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.people.getLimits({ api_key: '_' }); + var req = flickr.people.getLimits({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.people.getPhotos.js b/test/flickr.people.getPhotos.js index 112552d..8f45bca 100644 --- a/test/flickr.people.getPhotos.js +++ b/test/flickr.people.getPhotos.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.people.getPhotos', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.people.getPhotos({ user_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "user_id"', function () { assert.throws(function () { - flickr.people.getPhotos({ api_key: '_' }); + flickr.people.getPhotos({}); }, function (err) { return err.message === 'Missing required argument "user_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.people.getPhotos', function () { }); it('returns a Request instance', function () { - var req = flickr.people.getPhotos({ api_key: '_', user_id: '_' }); + var req = flickr.people.getPhotos({ user_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.people.getPhotosOf.js b/test/flickr.people.getPhotosOf.js index 7c83276..908f475 100644 --- a/test/flickr.people.getPhotosOf.js +++ b/test/flickr.people.getPhotosOf.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.people.getPhotosOf', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.people.getPhotosOf({ user_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "user_id"', function () { assert.throws(function () { - flickr.people.getPhotosOf({ api_key: '_' }); + flickr.people.getPhotosOf({}); }, function (err) { return err.message === 'Missing required argument "user_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.people.getPhotosOf', function () { }); it('returns a Request instance', function () { - var req = flickr.people.getPhotosOf({ api_key: '_', user_id: '_' }); + var req = flickr.people.getPhotosOf({ user_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.people.getPublicGroups.js b/test/flickr.people.getPublicGroups.js index ac87f5b..6b130d3 100644 --- a/test/flickr.people.getPublicGroups.js +++ b/test/flickr.people.getPublicGroups.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.people.getPublicGroups', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.people.getPublicGroups({ user_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "user_id"', function () { assert.throws(function () { - flickr.people.getPublicGroups({ api_key: '_' }); + flickr.people.getPublicGroups({}); }, function (err) { return err.message === 'Missing required argument "user_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.people.getPublicGroups', function () { }); it('returns a Request instance', function () { - var req = flickr.people.getPublicGroups({ api_key: '_', user_id: '_' }); + var req = flickr.people.getPublicGroups({ user_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.people.getPublicPhotos.js b/test/flickr.people.getPublicPhotos.js index 3e38d57..a652ee8 100644 --- a/test/flickr.people.getPublicPhotos.js +++ b/test/flickr.people.getPublicPhotos.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.people.getPublicPhotos', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.people.getPublicPhotos({ user_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "user_id"', function () { assert.throws(function () { - flickr.people.getPublicPhotos({ api_key: '_' }); + flickr.people.getPublicPhotos({}); }, function (err) { return err.message === 'Missing required argument "user_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.people.getPublicPhotos', function () { }); it('returns a Request instance', function () { - var req = flickr.people.getPublicPhotos({ api_key: '_', user_id: '_' }); + var req = flickr.people.getPublicPhotos({ user_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.people.getUploadStatus.js b/test/flickr.people.getUploadStatus.js index 120fcff..0fd9826 100644 --- a/test/flickr.people.getUploadStatus.js +++ b/test/flickr.people.getUploadStatus.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.people.getUploadStatus', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.people.getUploadStatus({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.people.getUploadStatus({ api_key: '_' }); + var req = flickr.people.getUploadStatus({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.addTags.js b/test/flickr.photos.addTags.js index 2993a5c..3bdf892 100644 --- a/test/flickr.photos.addTags.js +++ b/test/flickr.photos.addTags.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.addTags', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.addTags({ photo_id: '_', tags: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.addTags({ api_key: '_', tags: '_' }); + flickr.photos.addTags({ tags: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.photos.addTags', function () { it('requires "tags"', function () { assert.throws(function () { - flickr.photos.addTags({ api_key: '_', photo_id: '_' }); + flickr.photos.addTags({ photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "tags"'; }); @@ -34,7 +24,7 @@ describe('flickr.photos.addTags', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.addTags({ api_key: '_', photo_id: '_', tags: '_' }); + var req = flickr.photos.addTags({ photo_id: '_', tags: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.comments.addComment.js b/test/flickr.photos.comments.addComment.js index b6443e1..370bd96 100644 --- a/test/flickr.photos.comments.addComment.js +++ b/test/flickr.photos.comments.addComment.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.comments.addComment', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.comments.addComment({ photo_id: '_', comment_text: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.comments.addComment({ api_key: '_', comment_text: '_' }); + flickr.photos.comments.addComment({ comment_text: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.photos.comments.addComment', function () { it('requires "comment_text"', function () { assert.throws(function () { - flickr.photos.comments.addComment({ api_key: '_', photo_id: '_' }); + flickr.photos.comments.addComment({ photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "comment_text"'; }); @@ -34,7 +24,7 @@ describe('flickr.photos.comments.addComment', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.comments.addComment({ api_key: '_', photo_id: '_', comment_text: '_' }); + var req = flickr.photos.comments.addComment({ photo_id: '_', comment_text: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.comments.deleteComment.js b/test/flickr.photos.comments.deleteComment.js index 211f280..795ec27 100644 --- a/test/flickr.photos.comments.deleteComment.js +++ b/test/flickr.photos.comments.deleteComment.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.comments.deleteComment', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.comments.deleteComment({ comment_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "comment_id"', function () { assert.throws(function () { - flickr.photos.comments.deleteComment({ api_key: '_' }); + flickr.photos.comments.deleteComment({}); }, function (err) { return err.message === 'Missing required argument "comment_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.photos.comments.deleteComment', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.comments.deleteComment({ api_key: '_', comment_id: '_' }); + var req = flickr.photos.comments.deleteComment({ comment_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.comments.editComment.js b/test/flickr.photos.comments.editComment.js index ffb0e01..27514cd 100644 --- a/test/flickr.photos.comments.editComment.js +++ b/test/flickr.photos.comments.editComment.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.comments.editComment', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.comments.editComment({ comment_id: '_', comment_text: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "comment_id"', function () { assert.throws(function () { - flickr.photos.comments.editComment({ api_key: '_', comment_text: '_' }); + flickr.photos.comments.editComment({ comment_text: '_' }); }, function (err) { return err.message === 'Missing required argument "comment_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.photos.comments.editComment', function () { it('requires "comment_text"', function () { assert.throws(function () { - flickr.photos.comments.editComment({ api_key: '_', comment_id: '_' }); + flickr.photos.comments.editComment({ comment_id: '_' }); }, function (err) { return err.message === 'Missing required argument "comment_text"'; }); @@ -34,7 +24,7 @@ describe('flickr.photos.comments.editComment', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.comments.editComment({ api_key: '_', comment_id: '_', comment_text: '_' }); + var req = flickr.photos.comments.editComment({ comment_id: '_', comment_text: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.comments.getList.js b/test/flickr.photos.comments.getList.js index 11dc1f8..91dc3d7 100644 --- a/test/flickr.photos.comments.getList.js +++ b/test/flickr.photos.comments.getList.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.comments.getList', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.comments.getList({ photo_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.comments.getList({ api_key: '_' }); + flickr.photos.comments.getList({}); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.photos.comments.getList', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.comments.getList({ api_key: '_', photo_id: '_' }); + var req = flickr.photos.comments.getList({ photo_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.comments.getRecentForContacts.js b/test/flickr.photos.comments.getRecentForContacts.js index a081ec2..7aacd0f 100644 --- a/test/flickr.photos.comments.getRecentForContacts.js +++ b/test/flickr.photos.comments.getRecentForContacts.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.photos.comments.getRecentForContacts', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.comments.getRecentForContacts({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.photos.comments.getRecentForContacts({ api_key: '_' }); + var req = flickr.photos.comments.getRecentForContacts({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.delete.js b/test/flickr.photos.delete.js index 80dee4d..78f489f 100644 --- a/test/flickr.photos.delete.js +++ b/test/flickr.photos.delete.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.delete', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.delete({ photo_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.delete({ api_key: '_' }); + flickr.photos.delete({}); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.photos.delete', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.delete({ api_key: '_', photo_id: '_' }); + var req = flickr.photos.delete({ photo_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.geo.batchCorrectLocation.js b/test/flickr.photos.geo.batchCorrectLocation.js index f1f3f06..4d962a9 100644 --- a/test/flickr.photos.geo.batchCorrectLocation.js +++ b/test/flickr.photos.geo.batchCorrectLocation.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.geo.batchCorrectLocation', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.geo.batchCorrectLocation({ lat: '_', lon: '_', accuracy: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "lat"', function () { assert.throws(function () { - flickr.photos.geo.batchCorrectLocation({ api_key: '_', lon: '_', accuracy: '_' }); + flickr.photos.geo.batchCorrectLocation({ lon: '_', accuracy: '_' }); }, function (err) { return err.message === 'Missing required argument "lat"'; }); @@ -26,7 +16,7 @@ describe('flickr.photos.geo.batchCorrectLocation', function () { it('requires "lon"', function () { assert.throws(function () { - flickr.photos.geo.batchCorrectLocation({ api_key: '_', lat: '_', accuracy: '_' }); + flickr.photos.geo.batchCorrectLocation({ lat: '_', accuracy: '_' }); }, function (err) { return err.message === 'Missing required argument "lon"'; }); @@ -36,7 +26,7 @@ describe('flickr.photos.geo.batchCorrectLocation', function () { it('requires "accuracy"', function () { assert.throws(function () { - flickr.photos.geo.batchCorrectLocation({ api_key: '_', lat: '_', lon: '_' }); + flickr.photos.geo.batchCorrectLocation({ lat: '_', lon: '_' }); }, function (err) { return err.message === 'Missing required argument "accuracy"'; }); @@ -44,7 +34,7 @@ describe('flickr.photos.geo.batchCorrectLocation', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.geo.batchCorrectLocation({ api_key: '_', lat: '_', lon: '_', accuracy: '_' }); + var req = flickr.photos.geo.batchCorrectLocation({ lat: '_', lon: '_', accuracy: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.geo.correctLocation.js b/test/flickr.photos.geo.correctLocation.js index c98c04a..3501271 100644 --- a/test/flickr.photos.geo.correctLocation.js +++ b/test/flickr.photos.geo.correctLocation.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.geo.correctLocation', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.geo.correctLocation({ photo_id: '_', foursquare_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.geo.correctLocation({ api_key: '_', foursquare_id: '_' }); + flickr.photos.geo.correctLocation({ foursquare_id: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.photos.geo.correctLocation', function () { it('requires "foursquare_id"', function () { assert.throws(function () { - flickr.photos.geo.correctLocation({ api_key: '_', photo_id: '_' }); + flickr.photos.geo.correctLocation({ photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "foursquare_id"'; }); @@ -34,7 +24,7 @@ describe('flickr.photos.geo.correctLocation', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.geo.correctLocation({ api_key: '_', photo_id: '_', foursquare_id: '_' }); + var req = flickr.photos.geo.correctLocation({ photo_id: '_', foursquare_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.geo.getLocation.js b/test/flickr.photos.geo.getLocation.js index 2e5e274..6aeac58 100644 --- a/test/flickr.photos.geo.getLocation.js +++ b/test/flickr.photos.geo.getLocation.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.geo.getLocation', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.geo.getLocation({ photo_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.geo.getLocation({ api_key: '_' }); + flickr.photos.geo.getLocation({}); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.photos.geo.getLocation', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.geo.getLocation({ api_key: '_', photo_id: '_' }); + var req = flickr.photos.geo.getLocation({ photo_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.geo.getPerms.js b/test/flickr.photos.geo.getPerms.js index e38f1c4..972687a 100644 --- a/test/flickr.photos.geo.getPerms.js +++ b/test/flickr.photos.geo.getPerms.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.geo.getPerms', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.geo.getPerms({ photo_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.geo.getPerms({ api_key: '_' }); + flickr.photos.geo.getPerms({}); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.photos.geo.getPerms', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.geo.getPerms({ api_key: '_', photo_id: '_' }); + var req = flickr.photos.geo.getPerms({ photo_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.geo.photosForLocation.js b/test/flickr.photos.geo.photosForLocation.js index fbd6c80..8f10df4 100644 --- a/test/flickr.photos.geo.photosForLocation.js +++ b/test/flickr.photos.geo.photosForLocation.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.geo.photosForLocation', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.geo.photosForLocation({ lat: '_', lon: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "lat"', function () { assert.throws(function () { - flickr.photos.geo.photosForLocation({ api_key: '_', lon: '_' }); + flickr.photos.geo.photosForLocation({ lon: '_' }); }, function (err) { return err.message === 'Missing required argument "lat"'; }); @@ -26,7 +16,7 @@ describe('flickr.photos.geo.photosForLocation', function () { it('requires "lon"', function () { assert.throws(function () { - flickr.photos.geo.photosForLocation({ api_key: '_', lat: '_' }); + flickr.photos.geo.photosForLocation({ lat: '_' }); }, function (err) { return err.message === 'Missing required argument "lon"'; }); @@ -34,7 +24,7 @@ describe('flickr.photos.geo.photosForLocation', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.geo.photosForLocation({ api_key: '_', lat: '_', lon: '_' }); + var req = flickr.photos.geo.photosForLocation({ lat: '_', lon: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.geo.removeLocation.js b/test/flickr.photos.geo.removeLocation.js index 7498bbb..89bb689 100644 --- a/test/flickr.photos.geo.removeLocation.js +++ b/test/flickr.photos.geo.removeLocation.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.geo.removeLocation', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.geo.removeLocation({ photo_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.geo.removeLocation({ api_key: '_' }); + flickr.photos.geo.removeLocation({}); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.photos.geo.removeLocation', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.geo.removeLocation({ api_key: '_', photo_id: '_' }); + var req = flickr.photos.geo.removeLocation({ photo_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.geo.setContext.js b/test/flickr.photos.geo.setContext.js index b1a22e2..fe57bcc 100644 --- a/test/flickr.photos.geo.setContext.js +++ b/test/flickr.photos.geo.setContext.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.geo.setContext', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.geo.setContext({ photo_id: '_', context: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.geo.setContext({ api_key: '_', context: '_' }); + flickr.photos.geo.setContext({ context: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.photos.geo.setContext', function () { it('requires "context"', function () { assert.throws(function () { - flickr.photos.geo.setContext({ api_key: '_', photo_id: '_' }); + flickr.photos.geo.setContext({ photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "context"'; }); @@ -34,7 +24,7 @@ describe('flickr.photos.geo.setContext', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.geo.setContext({ api_key: '_', photo_id: '_', context: '_' }); + var req = flickr.photos.geo.setContext({ photo_id: '_', context: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.geo.setLocation.js b/test/flickr.photos.geo.setLocation.js index a0b87d4..63bc6f0 100644 --- a/test/flickr.photos.geo.setLocation.js +++ b/test/flickr.photos.geo.setLocation.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.geo.setLocation', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.geo.setLocation({ photo_id: '_', lat: '_', lon: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.geo.setLocation({ api_key: '_', lat: '_', lon: '_' }); + flickr.photos.geo.setLocation({ lat: '_', lon: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.photos.geo.setLocation', function () { it('requires "lat"', function () { assert.throws(function () { - flickr.photos.geo.setLocation({ api_key: '_', photo_id: '_', lon: '_' }); + flickr.photos.geo.setLocation({ photo_id: '_', lon: '_' }); }, function (err) { return err.message === 'Missing required argument "lat"'; }); @@ -36,7 +26,7 @@ describe('flickr.photos.geo.setLocation', function () { it('requires "lon"', function () { assert.throws(function () { - flickr.photos.geo.setLocation({ api_key: '_', photo_id: '_', lat: '_' }); + flickr.photos.geo.setLocation({ photo_id: '_', lat: '_' }); }, function (err) { return err.message === 'Missing required argument "lon"'; }); @@ -44,7 +34,7 @@ describe('flickr.photos.geo.setLocation', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.geo.setLocation({ api_key: '_', photo_id: '_', lat: '_', lon: '_' }); + var req = flickr.photos.geo.setLocation({ photo_id: '_', lat: '_', lon: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.geo.setPerms.js b/test/flickr.photos.geo.setPerms.js index 34506c4..3ddb25a 100644 --- a/test/flickr.photos.geo.setPerms.js +++ b/test/flickr.photos.geo.setPerms.js @@ -3,28 +3,10 @@ var assert = require('assert'); describe('flickr.photos.geo.setPerms', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.geo.setPerms({ is_public: '_', - is_contact: '_', - is_friend: '_', - is_family: '_', - photo_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "is_public"', function () { assert.throws(function () { - flickr.photos.geo.setPerms({ api_key: '_', - is_contact: '_', - is_friend: '_', - is_family: '_', - photo_id: '_' }); + flickr.photos.geo.setPerms({ is_contact: '_', is_friend: '_', is_family: '_', photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "is_public"'; }); @@ -34,11 +16,7 @@ describe('flickr.photos.geo.setPerms', function () { it('requires "is_contact"', function () { assert.throws(function () { - flickr.photos.geo.setPerms({ api_key: '_', - is_public: '_', - is_friend: '_', - is_family: '_', - photo_id: '_' }); + flickr.photos.geo.setPerms({ is_public: '_', is_friend: '_', is_family: '_', photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "is_contact"'; }); @@ -48,11 +26,7 @@ describe('flickr.photos.geo.setPerms', function () { it('requires "is_friend"', function () { assert.throws(function () { - flickr.photos.geo.setPerms({ api_key: '_', - is_public: '_', - is_contact: '_', - is_family: '_', - photo_id: '_' }); + flickr.photos.geo.setPerms({ is_public: '_', is_contact: '_', is_family: '_', photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "is_friend"'; }); @@ -62,11 +36,7 @@ describe('flickr.photos.geo.setPerms', function () { it('requires "is_family"', function () { assert.throws(function () { - flickr.photos.geo.setPerms({ api_key: '_', - is_public: '_', - is_contact: '_', - is_friend: '_', - photo_id: '_' }); + flickr.photos.geo.setPerms({ is_public: '_', is_contact: '_', is_friend: '_', photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "is_family"'; }); @@ -76,8 +46,7 @@ describe('flickr.photos.geo.setPerms', function () { it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.geo.setPerms({ api_key: '_', - is_public: '_', + flickr.photos.geo.setPerms({ is_public: '_', is_contact: '_', is_friend: '_', is_family: '_' }); @@ -88,8 +57,7 @@ describe('flickr.photos.geo.setPerms', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.geo.setPerms({ api_key: '_', - is_public: '_', + var req = flickr.photos.geo.setPerms({ is_public: '_', is_contact: '_', is_friend: '_', is_family: '_', diff --git a/test/flickr.photos.getAllContexts.js b/test/flickr.photos.getAllContexts.js index 7110715..712075d 100644 --- a/test/flickr.photos.getAllContexts.js +++ b/test/flickr.photos.getAllContexts.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.getAllContexts', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.getAllContexts({ photo_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.getAllContexts({ api_key: '_' }); + flickr.photos.getAllContexts({}); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.photos.getAllContexts', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.getAllContexts({ api_key: '_', photo_id: '_' }); + var req = flickr.photos.getAllContexts({ photo_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.getContactsPhotos.js b/test/flickr.photos.getContactsPhotos.js index 28535d8..18e23e9 100644 --- a/test/flickr.photos.getContactsPhotos.js +++ b/test/flickr.photos.getContactsPhotos.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.photos.getContactsPhotos', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.getContactsPhotos({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.photos.getContactsPhotos({ api_key: '_' }); + var req = flickr.photos.getContactsPhotos({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.getContactsPublicPhotos.js b/test/flickr.photos.getContactsPublicPhotos.js index 4746445..9f0098d 100644 --- a/test/flickr.photos.getContactsPublicPhotos.js +++ b/test/flickr.photos.getContactsPublicPhotos.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.getContactsPublicPhotos', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.getContactsPublicPhotos({ user_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "user_id"', function () { assert.throws(function () { - flickr.photos.getContactsPublicPhotos({ api_key: '_' }); + flickr.photos.getContactsPublicPhotos({}); }, function (err) { return err.message === 'Missing required argument "user_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.photos.getContactsPublicPhotos', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.getContactsPublicPhotos({ api_key: '_', user_id: '_' }); + var req = flickr.photos.getContactsPublicPhotos({ user_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.getContext.js b/test/flickr.photos.getContext.js index 207c2ed..fadd4b7 100644 --- a/test/flickr.photos.getContext.js +++ b/test/flickr.photos.getContext.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.getContext', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.getContext({ photo_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.getContext({ api_key: '_' }); + flickr.photos.getContext({}); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.photos.getContext', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.getContext({ api_key: '_', photo_id: '_' }); + var req = flickr.photos.getContext({ photo_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.getCounts.js b/test/flickr.photos.getCounts.js index 97325f5..2ceb0cf 100644 --- a/test/flickr.photos.getCounts.js +++ b/test/flickr.photos.getCounts.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.photos.getCounts', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.getCounts({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.photos.getCounts({ api_key: '_' }); + var req = flickr.photos.getCounts({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.getExif.js b/test/flickr.photos.getExif.js index 940baf0..af0d3d4 100644 --- a/test/flickr.photos.getExif.js +++ b/test/flickr.photos.getExif.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.getExif', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.getExif({ photo_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.getExif({ api_key: '_' }); + flickr.photos.getExif({}); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.photos.getExif', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.getExif({ api_key: '_', photo_id: '_' }); + var req = flickr.photos.getExif({ photo_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.getFavorites.js b/test/flickr.photos.getFavorites.js index 3617cd9..a650f9e 100644 --- a/test/flickr.photos.getFavorites.js +++ b/test/flickr.photos.getFavorites.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.getFavorites', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.getFavorites({ photo_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.getFavorites({ api_key: '_' }); + flickr.photos.getFavorites({}); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.photos.getFavorites', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.getFavorites({ api_key: '_', photo_id: '_' }); + var req = flickr.photos.getFavorites({ photo_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.getInfo.js b/test/flickr.photos.getInfo.js index 0201072..d639a82 100644 --- a/test/flickr.photos.getInfo.js +++ b/test/flickr.photos.getInfo.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.getInfo', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.getInfo({ photo_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.getInfo({ api_key: '_' }); + flickr.photos.getInfo({}); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.photos.getInfo', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.getInfo({ api_key: '_', photo_id: '_' }); + var req = flickr.photos.getInfo({ photo_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.getNotInSet.js b/test/flickr.photos.getNotInSet.js index d298328..74fba0a 100644 --- a/test/flickr.photos.getNotInSet.js +++ b/test/flickr.photos.getNotInSet.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.photos.getNotInSet', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.getNotInSet({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.photos.getNotInSet({ api_key: '_' }); + var req = flickr.photos.getNotInSet({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.getPerms.js b/test/flickr.photos.getPerms.js index 3f11462..ffaa3b2 100644 --- a/test/flickr.photos.getPerms.js +++ b/test/flickr.photos.getPerms.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.getPerms', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.getPerms({ photo_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.getPerms({ api_key: '_' }); + flickr.photos.getPerms({}); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.photos.getPerms', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.getPerms({ api_key: '_', photo_id: '_' }); + var req = flickr.photos.getPerms({ photo_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.getRecent.js b/test/flickr.photos.getRecent.js index 49e0baf..7ac10a3 100644 --- a/test/flickr.photos.getRecent.js +++ b/test/flickr.photos.getRecent.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.photos.getRecent', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.getRecent({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.photos.getRecent({ api_key: '_' }); + var req = flickr.photos.getRecent({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.getSizes.js b/test/flickr.photos.getSizes.js index f78ca24..ba6e1fb 100644 --- a/test/flickr.photos.getSizes.js +++ b/test/flickr.photos.getSizes.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.getSizes', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.getSizes({ photo_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.getSizes({ api_key: '_' }); + flickr.photos.getSizes({}); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.photos.getSizes', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.getSizes({ api_key: '_', photo_id: '_' }); + var req = flickr.photos.getSizes({ photo_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.getUntagged.js b/test/flickr.photos.getUntagged.js index c75c35e..e2236f6 100644 --- a/test/flickr.photos.getUntagged.js +++ b/test/flickr.photos.getUntagged.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.photos.getUntagged', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.getUntagged({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.photos.getUntagged({ api_key: '_' }); + var req = flickr.photos.getUntagged({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.getWithGeoData.js b/test/flickr.photos.getWithGeoData.js index 889c556..9f2909c 100644 --- a/test/flickr.photos.getWithGeoData.js +++ b/test/flickr.photos.getWithGeoData.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.photos.getWithGeoData', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.getWithGeoData({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.photos.getWithGeoData({ api_key: '_' }); + var req = flickr.photos.getWithGeoData({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.getWithoutGeoData.js b/test/flickr.photos.getWithoutGeoData.js index 16b2511..5b51dde 100644 --- a/test/flickr.photos.getWithoutGeoData.js +++ b/test/flickr.photos.getWithoutGeoData.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.photos.getWithoutGeoData', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.getWithoutGeoData({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.photos.getWithoutGeoData({ api_key: '_' }); + var req = flickr.photos.getWithoutGeoData({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.licenses.getInfo.js b/test/flickr.photos.licenses.getInfo.js index 9a07b53..dca9725 100644 --- a/test/flickr.photos.licenses.getInfo.js +++ b/test/flickr.photos.licenses.getInfo.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.photos.licenses.getInfo', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.licenses.getInfo({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.photos.licenses.getInfo({ api_key: '_' }); + var req = flickr.photos.licenses.getInfo({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.licenses.setLicense.js b/test/flickr.photos.licenses.setLicense.js index d29e684..f4d9376 100644 --- a/test/flickr.photos.licenses.setLicense.js +++ b/test/flickr.photos.licenses.setLicense.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.licenses.setLicense', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.licenses.setLicense({ photo_id: '_', license_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.licenses.setLicense({ api_key: '_', license_id: '_' }); + flickr.photos.licenses.setLicense({ license_id: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.photos.licenses.setLicense', function () { it('requires "license_id"', function () { assert.throws(function () { - flickr.photos.licenses.setLicense({ api_key: '_', photo_id: '_' }); + flickr.photos.licenses.setLicense({ photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "license_id"'; }); @@ -34,7 +24,7 @@ describe('flickr.photos.licenses.setLicense', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.licenses.setLicense({ api_key: '_', photo_id: '_', license_id: '_' }); + var req = flickr.photos.licenses.setLicense({ photo_id: '_', license_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.notes.add.js b/test/flickr.photos.notes.add.js index a98de4a..08fa038 100644 --- a/test/flickr.photos.notes.add.js +++ b/test/flickr.photos.notes.add.js @@ -3,26 +3,10 @@ var assert = require('assert'); describe('flickr.photos.notes.add', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.notes.add({ photo_id: '_', - note_x: '_', - note_y: '_', - note_w: '_', - note_h: '_', - note_text: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.notes.add({ api_key: '_', - note_x: '_', + flickr.photos.notes.add({ note_x: '_', note_y: '_', note_w: '_', note_h: '_', @@ -36,8 +20,7 @@ describe('flickr.photos.notes.add', function () { it('requires "note_x"', function () { assert.throws(function () { - flickr.photos.notes.add({ api_key: '_', - photo_id: '_', + flickr.photos.notes.add({ photo_id: '_', note_y: '_', note_w: '_', note_h: '_', @@ -51,8 +34,7 @@ describe('flickr.photos.notes.add', function () { it('requires "note_y"', function () { assert.throws(function () { - flickr.photos.notes.add({ api_key: '_', - photo_id: '_', + flickr.photos.notes.add({ photo_id: '_', note_x: '_', note_w: '_', note_h: '_', @@ -66,8 +48,7 @@ describe('flickr.photos.notes.add', function () { it('requires "note_w"', function () { assert.throws(function () { - flickr.photos.notes.add({ api_key: '_', - photo_id: '_', + flickr.photos.notes.add({ photo_id: '_', note_x: '_', note_y: '_', note_h: '_', @@ -81,8 +62,7 @@ describe('flickr.photos.notes.add', function () { it('requires "note_h"', function () { assert.throws(function () { - flickr.photos.notes.add({ api_key: '_', - photo_id: '_', + flickr.photos.notes.add({ photo_id: '_', note_x: '_', note_y: '_', note_w: '_', @@ -96,8 +76,7 @@ describe('flickr.photos.notes.add', function () { it('requires "note_text"', function () { assert.throws(function () { - flickr.photos.notes.add({ api_key: '_', - photo_id: '_', + flickr.photos.notes.add({ photo_id: '_', note_x: '_', note_y: '_', note_w: '_', @@ -109,8 +88,7 @@ describe('flickr.photos.notes.add', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.notes.add({ api_key: '_', - photo_id: '_', + var req = flickr.photos.notes.add({ photo_id: '_', note_x: '_', note_y: '_', note_w: '_', diff --git a/test/flickr.photos.notes.delete.js b/test/flickr.photos.notes.delete.js index 0b7418c..8362887 100644 --- a/test/flickr.photos.notes.delete.js +++ b/test/flickr.photos.notes.delete.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.notes.delete', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.notes.delete({ note_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "note_id"', function () { assert.throws(function () { - flickr.photos.notes.delete({ api_key: '_' }); + flickr.photos.notes.delete({}); }, function (err) { return err.message === 'Missing required argument "note_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.photos.notes.delete', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.notes.delete({ api_key: '_', note_id: '_' }); + var req = flickr.photos.notes.delete({ note_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.notes.edit.js b/test/flickr.photos.notes.edit.js index 7e50fac..f9abd1b 100644 --- a/test/flickr.photos.notes.edit.js +++ b/test/flickr.photos.notes.edit.js @@ -3,26 +3,10 @@ var assert = require('assert'); describe('flickr.photos.notes.edit', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.notes.edit({ note_id: '_', - note_x: '_', - note_y: '_', - note_w: '_', - note_h: '_', - note_text: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "note_id"', function () { assert.throws(function () { - flickr.photos.notes.edit({ api_key: '_', - note_x: '_', + flickr.photos.notes.edit({ note_x: '_', note_y: '_', note_w: '_', note_h: '_', @@ -36,8 +20,7 @@ describe('flickr.photos.notes.edit', function () { it('requires "note_x"', function () { assert.throws(function () { - flickr.photos.notes.edit({ api_key: '_', - note_id: '_', + flickr.photos.notes.edit({ note_id: '_', note_y: '_', note_w: '_', note_h: '_', @@ -51,8 +34,7 @@ describe('flickr.photos.notes.edit', function () { it('requires "note_y"', function () { assert.throws(function () { - flickr.photos.notes.edit({ api_key: '_', - note_id: '_', + flickr.photos.notes.edit({ note_id: '_', note_x: '_', note_w: '_', note_h: '_', @@ -66,8 +48,7 @@ describe('flickr.photos.notes.edit', function () { it('requires "note_w"', function () { assert.throws(function () { - flickr.photos.notes.edit({ api_key: '_', - note_id: '_', + flickr.photos.notes.edit({ note_id: '_', note_x: '_', note_y: '_', note_h: '_', @@ -81,8 +62,7 @@ describe('flickr.photos.notes.edit', function () { it('requires "note_h"', function () { assert.throws(function () { - flickr.photos.notes.edit({ api_key: '_', - note_id: '_', + flickr.photos.notes.edit({ note_id: '_', note_x: '_', note_y: '_', note_w: '_', @@ -96,8 +76,7 @@ describe('flickr.photos.notes.edit', function () { it('requires "note_text"', function () { assert.throws(function () { - flickr.photos.notes.edit({ api_key: '_', - note_id: '_', + flickr.photos.notes.edit({ note_id: '_', note_x: '_', note_y: '_', note_w: '_', @@ -109,8 +88,7 @@ describe('flickr.photos.notes.edit', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.notes.edit({ api_key: '_', - note_id: '_', + var req = flickr.photos.notes.edit({ note_id: '_', note_x: '_', note_y: '_', note_w: '_', diff --git a/test/flickr.photos.people.add.js b/test/flickr.photos.people.add.js index a03ffb9..f455355 100644 --- a/test/flickr.photos.people.add.js +++ b/test/flickr.photos.people.add.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.people.add', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.people.add({ photo_id: '_', user_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.people.add({ api_key: '_', user_id: '_' }); + flickr.photos.people.add({ user_id: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.photos.people.add', function () { it('requires "user_id"', function () { assert.throws(function () { - flickr.photos.people.add({ api_key: '_', photo_id: '_' }); + flickr.photos.people.add({ photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "user_id"'; }); @@ -34,7 +24,7 @@ describe('flickr.photos.people.add', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.people.add({ api_key: '_', photo_id: '_', user_id: '_' }); + var req = flickr.photos.people.add({ photo_id: '_', user_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.people.delete.js b/test/flickr.photos.people.delete.js index 9ccb30b..fe37509 100644 --- a/test/flickr.photos.people.delete.js +++ b/test/flickr.photos.people.delete.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.people.delete', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.people.delete({ photo_id: '_', user_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.people.delete({ api_key: '_', user_id: '_' }); + flickr.photos.people.delete({ user_id: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.photos.people.delete', function () { it('requires "user_id"', function () { assert.throws(function () { - flickr.photos.people.delete({ api_key: '_', photo_id: '_' }); + flickr.photos.people.delete({ photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "user_id"'; }); @@ -34,7 +24,7 @@ describe('flickr.photos.people.delete', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.people.delete({ api_key: '_', photo_id: '_', user_id: '_' }); + var req = flickr.photos.people.delete({ photo_id: '_', user_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.people.deleteCoords.js b/test/flickr.photos.people.deleteCoords.js index e512773..9a521ec 100644 --- a/test/flickr.photos.people.deleteCoords.js +++ b/test/flickr.photos.people.deleteCoords.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.people.deleteCoords', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.people.deleteCoords({ photo_id: '_', user_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.people.deleteCoords({ api_key: '_', user_id: '_' }); + flickr.photos.people.deleteCoords({ user_id: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.photos.people.deleteCoords', function () { it('requires "user_id"', function () { assert.throws(function () { - flickr.photos.people.deleteCoords({ api_key: '_', photo_id: '_' }); + flickr.photos.people.deleteCoords({ photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "user_id"'; }); @@ -34,7 +24,7 @@ describe('flickr.photos.people.deleteCoords', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.people.deleteCoords({ api_key: '_', photo_id: '_', user_id: '_' }); + var req = flickr.photos.people.deleteCoords({ photo_id: '_', user_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.people.editCoords.js b/test/flickr.photos.people.editCoords.js index 6575ef1..c1ca50e 100644 --- a/test/flickr.photos.people.editCoords.js +++ b/test/flickr.photos.people.editCoords.js @@ -3,26 +3,10 @@ var assert = require('assert'); describe('flickr.photos.people.editCoords', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.people.editCoords({ photo_id: '_', - user_id: '_', - person_x: '_', - person_y: '_', - person_w: '_', - person_h: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.people.editCoords({ api_key: '_', - user_id: '_', + flickr.photos.people.editCoords({ user_id: '_', person_x: '_', person_y: '_', person_w: '_', @@ -36,8 +20,7 @@ describe('flickr.photos.people.editCoords', function () { it('requires "user_id"', function () { assert.throws(function () { - flickr.photos.people.editCoords({ api_key: '_', - photo_id: '_', + flickr.photos.people.editCoords({ photo_id: '_', person_x: '_', person_y: '_', person_w: '_', @@ -51,8 +34,7 @@ describe('flickr.photos.people.editCoords', function () { it('requires "person_x"', function () { assert.throws(function () { - flickr.photos.people.editCoords({ api_key: '_', - photo_id: '_', + flickr.photos.people.editCoords({ photo_id: '_', user_id: '_', person_y: '_', person_w: '_', @@ -66,8 +48,7 @@ describe('flickr.photos.people.editCoords', function () { it('requires "person_y"', function () { assert.throws(function () { - flickr.photos.people.editCoords({ api_key: '_', - photo_id: '_', + flickr.photos.people.editCoords({ photo_id: '_', user_id: '_', person_x: '_', person_w: '_', @@ -81,8 +62,7 @@ describe('flickr.photos.people.editCoords', function () { it('requires "person_w"', function () { assert.throws(function () { - flickr.photos.people.editCoords({ api_key: '_', - photo_id: '_', + flickr.photos.people.editCoords({ photo_id: '_', user_id: '_', person_x: '_', person_y: '_', @@ -96,8 +76,7 @@ describe('flickr.photos.people.editCoords', function () { it('requires "person_h"', function () { assert.throws(function () { - flickr.photos.people.editCoords({ api_key: '_', - photo_id: '_', + flickr.photos.people.editCoords({ photo_id: '_', user_id: '_', person_x: '_', person_y: '_', @@ -109,8 +88,7 @@ describe('flickr.photos.people.editCoords', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.people.editCoords({ api_key: '_', - photo_id: '_', + var req = flickr.photos.people.editCoords({ photo_id: '_', user_id: '_', person_x: '_', person_y: '_', diff --git a/test/flickr.photos.people.getList.js b/test/flickr.photos.people.getList.js index 6d1e9f3..44871cf 100644 --- a/test/flickr.photos.people.getList.js +++ b/test/flickr.photos.people.getList.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.people.getList', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.people.getList({ photo_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.people.getList({ api_key: '_' }); + flickr.photos.people.getList({}); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.photos.people.getList', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.people.getList({ api_key: '_', photo_id: '_' }); + var req = flickr.photos.people.getList({ photo_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.recentlyUpdated.js b/test/flickr.photos.recentlyUpdated.js index 01564ba..e72d776 100644 --- a/test/flickr.photos.recentlyUpdated.js +++ b/test/flickr.photos.recentlyUpdated.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.recentlyUpdated', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.recentlyUpdated({ min_date: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "min_date"', function () { assert.throws(function () { - flickr.photos.recentlyUpdated({ api_key: '_' }); + flickr.photos.recentlyUpdated({}); }, function (err) { return err.message === 'Missing required argument "min_date"'; }); @@ -24,7 +14,7 @@ describe('flickr.photos.recentlyUpdated', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.recentlyUpdated({ api_key: '_', min_date: '_' }); + var req = flickr.photos.recentlyUpdated({ min_date: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.removeTag.js b/test/flickr.photos.removeTag.js index f4eea61..1072e45 100644 --- a/test/flickr.photos.removeTag.js +++ b/test/flickr.photos.removeTag.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.removeTag', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.removeTag({ tag_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "tag_id"', function () { assert.throws(function () { - flickr.photos.removeTag({ api_key: '_' }); + flickr.photos.removeTag({}); }, function (err) { return err.message === 'Missing required argument "tag_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.photos.removeTag', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.removeTag({ api_key: '_', tag_id: '_' }); + var req = flickr.photos.removeTag({ tag_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.search.js b/test/flickr.photos.search.js index de2d4bc..cd6a53c 100644 --- a/test/flickr.photos.search.js +++ b/test/flickr.photos.search.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.photos.search', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.search({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.photos.search({ api_key: '_' }); + var req = flickr.photos.search({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.setContentType.js b/test/flickr.photos.setContentType.js index 2e30444..da86dac 100644 --- a/test/flickr.photos.setContentType.js +++ b/test/flickr.photos.setContentType.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.setContentType', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.setContentType({ photo_id: '_', content_type: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.setContentType({ api_key: '_', content_type: '_' }); + flickr.photos.setContentType({ content_type: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.photos.setContentType', function () { it('requires "content_type"', function () { assert.throws(function () { - flickr.photos.setContentType({ api_key: '_', photo_id: '_' }); + flickr.photos.setContentType({ photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "content_type"'; }); @@ -34,7 +24,7 @@ describe('flickr.photos.setContentType', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.setContentType({ api_key: '_', photo_id: '_', content_type: '_' }); + var req = flickr.photos.setContentType({ photo_id: '_', content_type: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.setDates.js b/test/flickr.photos.setDates.js index b4a5fe3..9b51b03 100644 --- a/test/flickr.photos.setDates.js +++ b/test/flickr.photos.setDates.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.setDates', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.setDates({ photo_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.setDates({ api_key: '_' }); + flickr.photos.setDates({}); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.photos.setDates', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.setDates({ api_key: '_', photo_id: '_' }); + var req = flickr.photos.setDates({ photo_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.setMeta.js b/test/flickr.photos.setMeta.js index 0fa91b4..facd6b6 100644 --- a/test/flickr.photos.setMeta.js +++ b/test/flickr.photos.setMeta.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.setMeta', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.setMeta({ photo_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.setMeta({ api_key: '_' }); + flickr.photos.setMeta({}); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.photos.setMeta', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.setMeta({ api_key: '_', photo_id: '_' }); + var req = flickr.photos.setMeta({ photo_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.setPerms.js b/test/flickr.photos.setPerms.js index 5441e5a..003e3fd 100644 --- a/test/flickr.photos.setPerms.js +++ b/test/flickr.photos.setPerms.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.setPerms', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.setPerms({ photo_id: '_', is_public: '_', is_friend: '_', is_family: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.setPerms({ api_key: '_', is_public: '_', is_friend: '_', is_family: '_' }); + flickr.photos.setPerms({ is_public: '_', is_friend: '_', is_family: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.photos.setPerms', function () { it('requires "is_public"', function () { assert.throws(function () { - flickr.photos.setPerms({ api_key: '_', photo_id: '_', is_friend: '_', is_family: '_' }); + flickr.photos.setPerms({ photo_id: '_', is_friend: '_', is_family: '_' }); }, function (err) { return err.message === 'Missing required argument "is_public"'; }); @@ -36,7 +26,7 @@ describe('flickr.photos.setPerms', function () { it('requires "is_friend"', function () { assert.throws(function () { - flickr.photos.setPerms({ api_key: '_', photo_id: '_', is_public: '_', is_family: '_' }); + flickr.photos.setPerms({ photo_id: '_', is_public: '_', is_family: '_' }); }, function (err) { return err.message === 'Missing required argument "is_friend"'; }); @@ -46,7 +36,7 @@ describe('flickr.photos.setPerms', function () { it('requires "is_family"', function () { assert.throws(function () { - flickr.photos.setPerms({ api_key: '_', photo_id: '_', is_public: '_', is_friend: '_' }); + flickr.photos.setPerms({ photo_id: '_', is_public: '_', is_friend: '_' }); }, function (err) { return err.message === 'Missing required argument "is_family"'; }); @@ -54,11 +44,7 @@ describe('flickr.photos.setPerms', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.setPerms({ api_key: '_', - photo_id: '_', - is_public: '_', - is_friend: '_', - is_family: '_' }); + var req = flickr.photos.setPerms({ photo_id: '_', is_public: '_', is_friend: '_', is_family: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.setSafetyLevel.js b/test/flickr.photos.setSafetyLevel.js index 05239d3..3a4197e 100644 --- a/test/flickr.photos.setSafetyLevel.js +++ b/test/flickr.photos.setSafetyLevel.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.setSafetyLevel', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.setSafetyLevel({ photo_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.setSafetyLevel({ api_key: '_' }); + flickr.photos.setSafetyLevel({}); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.photos.setSafetyLevel', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.setSafetyLevel({ api_key: '_', photo_id: '_' }); + var req = flickr.photos.setSafetyLevel({ photo_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.setTags.js b/test/flickr.photos.setTags.js index 5c11f3f..2c02770 100644 --- a/test/flickr.photos.setTags.js +++ b/test/flickr.photos.setTags.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.setTags', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.setTags({ photo_id: '_', tags: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.setTags({ api_key: '_', tags: '_' }); + flickr.photos.setTags({ tags: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.photos.setTags', function () { it('requires "tags"', function () { assert.throws(function () { - flickr.photos.setTags({ api_key: '_', photo_id: '_' }); + flickr.photos.setTags({ photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "tags"'; }); @@ -34,7 +24,7 @@ describe('flickr.photos.setTags', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.setTags({ api_key: '_', photo_id: '_', tags: '_' }); + var req = flickr.photos.setTags({ photo_id: '_', tags: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.suggestions.approveSuggestion.js b/test/flickr.photos.suggestions.approveSuggestion.js index 3e32b9a..3cce701 100644 --- a/test/flickr.photos.suggestions.approveSuggestion.js +++ b/test/flickr.photos.suggestions.approveSuggestion.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.suggestions.approveSuggestion', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.suggestions.approveSuggestion({ suggestion_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "suggestion_id"', function () { assert.throws(function () { - flickr.photos.suggestions.approveSuggestion({ api_key: '_' }); + flickr.photos.suggestions.approveSuggestion({}); }, function (err) { return err.message === 'Missing required argument "suggestion_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.photos.suggestions.approveSuggestion', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.suggestions.approveSuggestion({ api_key: '_', suggestion_id: '_' }); + var req = flickr.photos.suggestions.approveSuggestion({ suggestion_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.suggestions.getList.js b/test/flickr.photos.suggestions.getList.js index 5a7f232..f3d5d4e 100644 --- a/test/flickr.photos.suggestions.getList.js +++ b/test/flickr.photos.suggestions.getList.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.photos.suggestions.getList', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.suggestions.getList({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.photos.suggestions.getList({ api_key: '_' }); + var req = flickr.photos.suggestions.getList({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.suggestions.rejectSuggestion.js b/test/flickr.photos.suggestions.rejectSuggestion.js index 91a3dfa..5b42ac7 100644 --- a/test/flickr.photos.suggestions.rejectSuggestion.js +++ b/test/flickr.photos.suggestions.rejectSuggestion.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.suggestions.rejectSuggestion', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.suggestions.rejectSuggestion({ suggestion_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "suggestion_id"', function () { assert.throws(function () { - flickr.photos.suggestions.rejectSuggestion({ api_key: '_' }); + flickr.photos.suggestions.rejectSuggestion({}); }, function (err) { return err.message === 'Missing required argument "suggestion_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.photos.suggestions.rejectSuggestion', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.suggestions.rejectSuggestion({ api_key: '_', suggestion_id: '_' }); + var req = flickr.photos.suggestions.rejectSuggestion({ suggestion_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.suggestions.removeSuggestion.js b/test/flickr.photos.suggestions.removeSuggestion.js index 1c9cb94..4971e9f 100644 --- a/test/flickr.photos.suggestions.removeSuggestion.js +++ b/test/flickr.photos.suggestions.removeSuggestion.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.suggestions.removeSuggestion', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.suggestions.removeSuggestion({ suggestion_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "suggestion_id"', function () { assert.throws(function () { - flickr.photos.suggestions.removeSuggestion({ api_key: '_' }); + flickr.photos.suggestions.removeSuggestion({}); }, function (err) { return err.message === 'Missing required argument "suggestion_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.photos.suggestions.removeSuggestion', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.suggestions.removeSuggestion({ api_key: '_', suggestion_id: '_' }); + var req = flickr.photos.suggestions.removeSuggestion({ suggestion_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.suggestions.suggestLocation.js b/test/flickr.photos.suggestions.suggestLocation.js index 93e7b6a..ae76dd3 100644 --- a/test/flickr.photos.suggestions.suggestLocation.js +++ b/test/flickr.photos.suggestions.suggestLocation.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.suggestions.suggestLocation', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.suggestions.suggestLocation({ photo_id: '_', lat: '_', lon: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.suggestions.suggestLocation({ api_key: '_', lat: '_', lon: '_' }); + flickr.photos.suggestions.suggestLocation({ lat: '_', lon: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.photos.suggestions.suggestLocation', function () { it('requires "lat"', function () { assert.throws(function () { - flickr.photos.suggestions.suggestLocation({ api_key: '_', photo_id: '_', lon: '_' }); + flickr.photos.suggestions.suggestLocation({ photo_id: '_', lon: '_' }); }, function (err) { return err.message === 'Missing required argument "lat"'; }); @@ -36,7 +26,7 @@ describe('flickr.photos.suggestions.suggestLocation', function () { it('requires "lon"', function () { assert.throws(function () { - flickr.photos.suggestions.suggestLocation({ api_key: '_', photo_id: '_', lat: '_' }); + flickr.photos.suggestions.suggestLocation({ photo_id: '_', lat: '_' }); }, function (err) { return err.message === 'Missing required argument "lon"'; }); @@ -44,7 +34,7 @@ describe('flickr.photos.suggestions.suggestLocation', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.suggestions.suggestLocation({ api_key: '_', photo_id: '_', lat: '_', lon: '_' }); + var req = flickr.photos.suggestions.suggestLocation({ photo_id: '_', lat: '_', lon: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.transform.rotate.js b/test/flickr.photos.transform.rotate.js index 062180c..04380ee 100644 --- a/test/flickr.photos.transform.rotate.js +++ b/test/flickr.photos.transform.rotate.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.transform.rotate', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.transform.rotate({ photo_id: '_', degrees: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photos.transform.rotate({ api_key: '_', degrees: '_' }); + flickr.photos.transform.rotate({ degrees: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.photos.transform.rotate', function () { it('requires "degrees"', function () { assert.throws(function () { - flickr.photos.transform.rotate({ api_key: '_', photo_id: '_' }); + flickr.photos.transform.rotate({ photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "degrees"'; }); @@ -34,7 +24,7 @@ describe('flickr.photos.transform.rotate', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.transform.rotate({ api_key: '_', photo_id: '_', degrees: '_' }); + var req = flickr.photos.transform.rotate({ photo_id: '_', degrees: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photos.upload.checkTickets.js b/test/flickr.photos.upload.checkTickets.js index 15b5789..0a5d4fd 100644 --- a/test/flickr.photos.upload.checkTickets.js +++ b/test/flickr.photos.upload.checkTickets.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photos.upload.checkTickets', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photos.upload.checkTickets({ tickets: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "tickets"', function () { assert.throws(function () { - flickr.photos.upload.checkTickets({ api_key: '_' }); + flickr.photos.upload.checkTickets({}); }, function (err) { return err.message === 'Missing required argument "tickets"'; }); @@ -24,7 +14,7 @@ describe('flickr.photos.upload.checkTickets', function () { }); it('returns a Request instance', function () { - var req = flickr.photos.upload.checkTickets({ api_key: '_', tickets: '_' }); + var req = flickr.photos.upload.checkTickets({ tickets: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photosets.addPhoto.js b/test/flickr.photosets.addPhoto.js index db37041..5f28e83 100644 --- a/test/flickr.photosets.addPhoto.js +++ b/test/flickr.photosets.addPhoto.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photosets.addPhoto', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photosets.addPhoto({ photoset_id: '_', photo_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photoset_id"', function () { assert.throws(function () { - flickr.photosets.addPhoto({ api_key: '_', photo_id: '_' }); + flickr.photosets.addPhoto({ photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "photoset_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.photosets.addPhoto', function () { it('requires "photo_id"', function () { assert.throws(function () { - flickr.photosets.addPhoto({ api_key: '_', photoset_id: '_' }); + flickr.photosets.addPhoto({ photoset_id: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -34,7 +24,7 @@ describe('flickr.photosets.addPhoto', function () { }); it('returns a Request instance', function () { - var req = flickr.photosets.addPhoto({ api_key: '_', photoset_id: '_', photo_id: '_' }); + var req = flickr.photosets.addPhoto({ photoset_id: '_', photo_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photosets.comments.addComment.js b/test/flickr.photosets.comments.addComment.js index e8bcde0..3ba6a38 100644 --- a/test/flickr.photosets.comments.addComment.js +++ b/test/flickr.photosets.comments.addComment.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photosets.comments.addComment', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photosets.comments.addComment({ photoset_id: '_', comment_text: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photoset_id"', function () { assert.throws(function () { - flickr.photosets.comments.addComment({ api_key: '_', comment_text: '_' }); + flickr.photosets.comments.addComment({ comment_text: '_' }); }, function (err) { return err.message === 'Missing required argument "photoset_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.photosets.comments.addComment', function () { it('requires "comment_text"', function () { assert.throws(function () { - flickr.photosets.comments.addComment({ api_key: '_', photoset_id: '_' }); + flickr.photosets.comments.addComment({ photoset_id: '_' }); }, function (err) { return err.message === 'Missing required argument "comment_text"'; }); @@ -34,7 +24,7 @@ describe('flickr.photosets.comments.addComment', function () { }); it('returns a Request instance', function () { - var req = flickr.photosets.comments.addComment({ api_key: '_', photoset_id: '_', comment_text: '_' }); + var req = flickr.photosets.comments.addComment({ photoset_id: '_', comment_text: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photosets.comments.deleteComment.js b/test/flickr.photosets.comments.deleteComment.js index 03a591a..e278936 100644 --- a/test/flickr.photosets.comments.deleteComment.js +++ b/test/flickr.photosets.comments.deleteComment.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photosets.comments.deleteComment', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photosets.comments.deleteComment({ comment_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "comment_id"', function () { assert.throws(function () { - flickr.photosets.comments.deleteComment({ api_key: '_' }); + flickr.photosets.comments.deleteComment({}); }, function (err) { return err.message === 'Missing required argument "comment_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.photosets.comments.deleteComment', function () { }); it('returns a Request instance', function () { - var req = flickr.photosets.comments.deleteComment({ api_key: '_', comment_id: '_' }); + var req = flickr.photosets.comments.deleteComment({ comment_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photosets.comments.editComment.js b/test/flickr.photosets.comments.editComment.js index 9dbf1f1..6b68d74 100644 --- a/test/flickr.photosets.comments.editComment.js +++ b/test/flickr.photosets.comments.editComment.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photosets.comments.editComment', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photosets.comments.editComment({ comment_id: '_', comment_text: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "comment_id"', function () { assert.throws(function () { - flickr.photosets.comments.editComment({ api_key: '_', comment_text: '_' }); + flickr.photosets.comments.editComment({ comment_text: '_' }); }, function (err) { return err.message === 'Missing required argument "comment_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.photosets.comments.editComment', function () { it('requires "comment_text"', function () { assert.throws(function () { - flickr.photosets.comments.editComment({ api_key: '_', comment_id: '_' }); + flickr.photosets.comments.editComment({ comment_id: '_' }); }, function (err) { return err.message === 'Missing required argument "comment_text"'; }); @@ -34,7 +24,7 @@ describe('flickr.photosets.comments.editComment', function () { }); it('returns a Request instance', function () { - var req = flickr.photosets.comments.editComment({ api_key: '_', comment_id: '_', comment_text: '_' }); + var req = flickr.photosets.comments.editComment({ comment_id: '_', comment_text: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photosets.comments.getList.js b/test/flickr.photosets.comments.getList.js index c2ed2d4..870136b 100644 --- a/test/flickr.photosets.comments.getList.js +++ b/test/flickr.photosets.comments.getList.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photosets.comments.getList', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photosets.comments.getList({ photoset_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photoset_id"', function () { assert.throws(function () { - flickr.photosets.comments.getList({ api_key: '_' }); + flickr.photosets.comments.getList({}); }, function (err) { return err.message === 'Missing required argument "photoset_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.photosets.comments.getList', function () { }); it('returns a Request instance', function () { - var req = flickr.photosets.comments.getList({ api_key: '_', photoset_id: '_' }); + var req = flickr.photosets.comments.getList({ photoset_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photosets.create.js b/test/flickr.photosets.create.js index 1be005a..a334354 100644 --- a/test/flickr.photosets.create.js +++ b/test/flickr.photosets.create.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photosets.create', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photosets.create({ title: '_', primary_photo_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "title"', function () { assert.throws(function () { - flickr.photosets.create({ api_key: '_', primary_photo_id: '_' }); + flickr.photosets.create({ primary_photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "title"'; }); @@ -26,7 +16,7 @@ describe('flickr.photosets.create', function () { it('requires "primary_photo_id"', function () { assert.throws(function () { - flickr.photosets.create({ api_key: '_', title: '_' }); + flickr.photosets.create({ title: '_' }); }, function (err) { return err.message === 'Missing required argument "primary_photo_id"'; }); @@ -34,7 +24,7 @@ describe('flickr.photosets.create', function () { }); it('returns a Request instance', function () { - var req = flickr.photosets.create({ api_key: '_', title: '_', primary_photo_id: '_' }); + var req = flickr.photosets.create({ title: '_', primary_photo_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photosets.delete.js b/test/flickr.photosets.delete.js index abb9ae1..5c19581 100644 --- a/test/flickr.photosets.delete.js +++ b/test/flickr.photosets.delete.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photosets.delete', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photosets.delete({ photoset_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photoset_id"', function () { assert.throws(function () { - flickr.photosets.delete({ api_key: '_' }); + flickr.photosets.delete({}); }, function (err) { return err.message === 'Missing required argument "photoset_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.photosets.delete', function () { }); it('returns a Request instance', function () { - var req = flickr.photosets.delete({ api_key: '_', photoset_id: '_' }); + var req = flickr.photosets.delete({ photoset_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photosets.editMeta.js b/test/flickr.photosets.editMeta.js index 1c3b0df..ab35dc9 100644 --- a/test/flickr.photosets.editMeta.js +++ b/test/flickr.photosets.editMeta.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photosets.editMeta', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photosets.editMeta({ photoset_id: '_', title: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photoset_id"', function () { assert.throws(function () { - flickr.photosets.editMeta({ api_key: '_', title: '_' }); + flickr.photosets.editMeta({ title: '_' }); }, function (err) { return err.message === 'Missing required argument "photoset_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.photosets.editMeta', function () { it('requires "title"', function () { assert.throws(function () { - flickr.photosets.editMeta({ api_key: '_', photoset_id: '_' }); + flickr.photosets.editMeta({ photoset_id: '_' }); }, function (err) { return err.message === 'Missing required argument "title"'; }); @@ -34,7 +24,7 @@ describe('flickr.photosets.editMeta', function () { }); it('returns a Request instance', function () { - var req = flickr.photosets.editMeta({ api_key: '_', photoset_id: '_', title: '_' }); + var req = flickr.photosets.editMeta({ photoset_id: '_', title: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photosets.editPhotos.js b/test/flickr.photosets.editPhotos.js index 2873df4..d72c9df 100644 --- a/test/flickr.photosets.editPhotos.js +++ b/test/flickr.photosets.editPhotos.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photosets.editPhotos', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photosets.editPhotos({ photoset_id: '_', primary_photo_id: '_', photo_ids: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photoset_id"', function () { assert.throws(function () { - flickr.photosets.editPhotos({ api_key: '_', primary_photo_id: '_', photo_ids: '_' }); + flickr.photosets.editPhotos({ primary_photo_id: '_', photo_ids: '_' }); }, function (err) { return err.message === 'Missing required argument "photoset_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.photosets.editPhotos', function () { it('requires "primary_photo_id"', function () { assert.throws(function () { - flickr.photosets.editPhotos({ api_key: '_', photoset_id: '_', photo_ids: '_' }); + flickr.photosets.editPhotos({ photoset_id: '_', photo_ids: '_' }); }, function (err) { return err.message === 'Missing required argument "primary_photo_id"'; }); @@ -36,7 +26,7 @@ describe('flickr.photosets.editPhotos', function () { it('requires "photo_ids"', function () { assert.throws(function () { - flickr.photosets.editPhotos({ api_key: '_', photoset_id: '_', primary_photo_id: '_' }); + flickr.photosets.editPhotos({ photoset_id: '_', primary_photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_ids"'; }); @@ -44,10 +34,7 @@ describe('flickr.photosets.editPhotos', function () { }); it('returns a Request instance', function () { - var req = flickr.photosets.editPhotos({ api_key: '_', - photoset_id: '_', - primary_photo_id: '_', - photo_ids: '_' }); + var req = flickr.photosets.editPhotos({ photoset_id: '_', primary_photo_id: '_', photo_ids: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photosets.getContext.js b/test/flickr.photosets.getContext.js index 7800841..aa6fab7 100644 --- a/test/flickr.photosets.getContext.js +++ b/test/flickr.photosets.getContext.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photosets.getContext', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photosets.getContext({ photo_id: '_', photoset_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.photosets.getContext({ api_key: '_', photoset_id: '_' }); + flickr.photosets.getContext({ photoset_id: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.photosets.getContext', function () { it('requires "photoset_id"', function () { assert.throws(function () { - flickr.photosets.getContext({ api_key: '_', photo_id: '_' }); + flickr.photosets.getContext({ photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "photoset_id"'; }); @@ -34,7 +24,7 @@ describe('flickr.photosets.getContext', function () { }); it('returns a Request instance', function () { - var req = flickr.photosets.getContext({ api_key: '_', photo_id: '_', photoset_id: '_' }); + var req = flickr.photosets.getContext({ photo_id: '_', photoset_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photosets.getInfo.js b/test/flickr.photosets.getInfo.js index 4e21cc6..98169e4 100644 --- a/test/flickr.photosets.getInfo.js +++ b/test/flickr.photosets.getInfo.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photosets.getInfo', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photosets.getInfo({ photoset_id: '_', user_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photoset_id"', function () { assert.throws(function () { - flickr.photosets.getInfo({ api_key: '_', user_id: '_' }); + flickr.photosets.getInfo({ user_id: '_' }); }, function (err) { return err.message === 'Missing required argument "photoset_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.photosets.getInfo', function () { it('requires "user_id"', function () { assert.throws(function () { - flickr.photosets.getInfo({ api_key: '_', photoset_id: '_' }); + flickr.photosets.getInfo({ photoset_id: '_' }); }, function (err) { return err.message === 'Missing required argument "user_id"'; }); @@ -34,7 +24,7 @@ describe('flickr.photosets.getInfo', function () { }); it('returns a Request instance', function () { - var req = flickr.photosets.getInfo({ api_key: '_', photoset_id: '_', user_id: '_' }); + var req = flickr.photosets.getInfo({ photoset_id: '_', user_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photosets.getList.js b/test/flickr.photosets.getList.js index 2475a2a..612235c 100644 --- a/test/flickr.photosets.getList.js +++ b/test/flickr.photosets.getList.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.photosets.getList', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photosets.getList({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.photosets.getList({ api_key: '_' }); + var req = flickr.photosets.getList({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photosets.getPhotos.js b/test/flickr.photosets.getPhotos.js index 5d47eff..cdf6c6a 100644 --- a/test/flickr.photosets.getPhotos.js +++ b/test/flickr.photosets.getPhotos.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photosets.getPhotos', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photosets.getPhotos({ photoset_id: '_', user_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photoset_id"', function () { assert.throws(function () { - flickr.photosets.getPhotos({ api_key: '_', user_id: '_' }); + flickr.photosets.getPhotos({ user_id: '_' }); }, function (err) { return err.message === 'Missing required argument "photoset_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.photosets.getPhotos', function () { it('requires "user_id"', function () { assert.throws(function () { - flickr.photosets.getPhotos({ api_key: '_', photoset_id: '_' }); + flickr.photosets.getPhotos({ photoset_id: '_' }); }, function (err) { return err.message === 'Missing required argument "user_id"'; }); @@ -34,7 +24,7 @@ describe('flickr.photosets.getPhotos', function () { }); it('returns a Request instance', function () { - var req = flickr.photosets.getPhotos({ api_key: '_', photoset_id: '_', user_id: '_' }); + var req = flickr.photosets.getPhotos({ photoset_id: '_', user_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photosets.orderSets.js b/test/flickr.photosets.orderSets.js index 074fc13..4c1a06a 100644 --- a/test/flickr.photosets.orderSets.js +++ b/test/flickr.photosets.orderSets.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photosets.orderSets', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photosets.orderSets({ photoset_ids: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photoset_ids"', function () { assert.throws(function () { - flickr.photosets.orderSets({ api_key: '_' }); + flickr.photosets.orderSets({}); }, function (err) { return err.message === 'Missing required argument "photoset_ids"'; }); @@ -24,7 +14,7 @@ describe('flickr.photosets.orderSets', function () { }); it('returns a Request instance', function () { - var req = flickr.photosets.orderSets({ api_key: '_', photoset_ids: '_' }); + var req = flickr.photosets.orderSets({ photoset_ids: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photosets.removePhoto.js b/test/flickr.photosets.removePhoto.js index 0aa36f0..c925d91 100644 --- a/test/flickr.photosets.removePhoto.js +++ b/test/flickr.photosets.removePhoto.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photosets.removePhoto', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photosets.removePhoto({ photoset_id: '_', photo_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photoset_id"', function () { assert.throws(function () { - flickr.photosets.removePhoto({ api_key: '_', photo_id: '_' }); + flickr.photosets.removePhoto({ photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "photoset_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.photosets.removePhoto', function () { it('requires "photo_id"', function () { assert.throws(function () { - flickr.photosets.removePhoto({ api_key: '_', photoset_id: '_' }); + flickr.photosets.removePhoto({ photoset_id: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -34,7 +24,7 @@ describe('flickr.photosets.removePhoto', function () { }); it('returns a Request instance', function () { - var req = flickr.photosets.removePhoto({ api_key: '_', photoset_id: '_', photo_id: '_' }); + var req = flickr.photosets.removePhoto({ photoset_id: '_', photo_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photosets.removePhotos.js b/test/flickr.photosets.removePhotos.js index bbf1a8a..594a625 100644 --- a/test/flickr.photosets.removePhotos.js +++ b/test/flickr.photosets.removePhotos.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photosets.removePhotos', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photosets.removePhotos({ photoset_id: '_', photo_ids: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photoset_id"', function () { assert.throws(function () { - flickr.photosets.removePhotos({ api_key: '_', photo_ids: '_' }); + flickr.photosets.removePhotos({ photo_ids: '_' }); }, function (err) { return err.message === 'Missing required argument "photoset_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.photosets.removePhotos', function () { it('requires "photo_ids"', function () { assert.throws(function () { - flickr.photosets.removePhotos({ api_key: '_', photoset_id: '_' }); + flickr.photosets.removePhotos({ photoset_id: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_ids"'; }); @@ -34,7 +24,7 @@ describe('flickr.photosets.removePhotos', function () { }); it('returns a Request instance', function () { - var req = flickr.photosets.removePhotos({ api_key: '_', photoset_id: '_', photo_ids: '_' }); + var req = flickr.photosets.removePhotos({ photoset_id: '_', photo_ids: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photosets.reorderPhotos.js b/test/flickr.photosets.reorderPhotos.js index a932de4..29a54a9 100644 --- a/test/flickr.photosets.reorderPhotos.js +++ b/test/flickr.photosets.reorderPhotos.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photosets.reorderPhotos', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photosets.reorderPhotos({ photoset_id: '_', photo_ids: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photoset_id"', function () { assert.throws(function () { - flickr.photosets.reorderPhotos({ api_key: '_', photo_ids: '_' }); + flickr.photosets.reorderPhotos({ photo_ids: '_' }); }, function (err) { return err.message === 'Missing required argument "photoset_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.photosets.reorderPhotos', function () { it('requires "photo_ids"', function () { assert.throws(function () { - flickr.photosets.reorderPhotos({ api_key: '_', photoset_id: '_' }); + flickr.photosets.reorderPhotos({ photoset_id: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_ids"'; }); @@ -34,7 +24,7 @@ describe('flickr.photosets.reorderPhotos', function () { }); it('returns a Request instance', function () { - var req = flickr.photosets.reorderPhotos({ api_key: '_', photoset_id: '_', photo_ids: '_' }); + var req = flickr.photosets.reorderPhotos({ photoset_id: '_', photo_ids: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.photosets.setPrimaryPhoto.js b/test/flickr.photosets.setPrimaryPhoto.js index ee9b332..c73e43d 100644 --- a/test/flickr.photosets.setPrimaryPhoto.js +++ b/test/flickr.photosets.setPrimaryPhoto.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.photosets.setPrimaryPhoto', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.photosets.setPrimaryPhoto({ photoset_id: '_', photo_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photoset_id"', function () { assert.throws(function () { - flickr.photosets.setPrimaryPhoto({ api_key: '_', photo_id: '_' }); + flickr.photosets.setPrimaryPhoto({ photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "photoset_id"'; }); @@ -26,7 +16,7 @@ describe('flickr.photosets.setPrimaryPhoto', function () { it('requires "photo_id"', function () { assert.throws(function () { - flickr.photosets.setPrimaryPhoto({ api_key: '_', photoset_id: '_' }); + flickr.photosets.setPrimaryPhoto({ photoset_id: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -34,7 +24,7 @@ describe('flickr.photosets.setPrimaryPhoto', function () { }); it('returns a Request instance', function () { - var req = flickr.photosets.setPrimaryPhoto({ api_key: '_', photoset_id: '_', photo_id: '_' }); + var req = flickr.photosets.setPrimaryPhoto({ photoset_id: '_', photo_id: '_' }); assert.equal(req.method, 'POST'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.places.find.js b/test/flickr.places.find.js index 8d43199..313ed46 100644 --- a/test/flickr.places.find.js +++ b/test/flickr.places.find.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.places.find', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.places.find({ query: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "query"', function () { assert.throws(function () { - flickr.places.find({ api_key: '_' }); + flickr.places.find({}); }, function (err) { return err.message === 'Missing required argument "query"'; }); @@ -24,7 +14,7 @@ describe('flickr.places.find', function () { }); it('returns a Request instance', function () { - var req = flickr.places.find({ api_key: '_', query: '_' }); + var req = flickr.places.find({ query: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.places.findByLatLon.js b/test/flickr.places.findByLatLon.js index 9dbe46d..45acc51 100644 --- a/test/flickr.places.findByLatLon.js +++ b/test/flickr.places.findByLatLon.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.places.findByLatLon', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.places.findByLatLon({ lat: '_', lon: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "lat"', function () { assert.throws(function () { - flickr.places.findByLatLon({ api_key: '_', lon: '_' }); + flickr.places.findByLatLon({ lon: '_' }); }, function (err) { return err.message === 'Missing required argument "lat"'; }); @@ -26,7 +16,7 @@ describe('flickr.places.findByLatLon', function () { it('requires "lon"', function () { assert.throws(function () { - flickr.places.findByLatLon({ api_key: '_', lat: '_' }); + flickr.places.findByLatLon({ lat: '_' }); }, function (err) { return err.message === 'Missing required argument "lon"'; }); @@ -34,7 +24,7 @@ describe('flickr.places.findByLatLon', function () { }); it('returns a Request instance', function () { - var req = flickr.places.findByLatLon({ api_key: '_', lat: '_', lon: '_' }); + var req = flickr.places.findByLatLon({ lat: '_', lon: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.places.getChildrenWithPhotosPublic.js b/test/flickr.places.getChildrenWithPhotosPublic.js index 84bdf22..3f08568 100644 --- a/test/flickr.places.getChildrenWithPhotosPublic.js +++ b/test/flickr.places.getChildrenWithPhotosPublic.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.places.getChildrenWithPhotosPublic', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.places.getChildrenWithPhotosPublic({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.places.getChildrenWithPhotosPublic({ api_key: '_' }); + var req = flickr.places.getChildrenWithPhotosPublic({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.places.getInfo.js b/test/flickr.places.getInfo.js index a69698f..5c494cb 100644 --- a/test/flickr.places.getInfo.js +++ b/test/flickr.places.getInfo.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.places.getInfo', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.places.getInfo({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.places.getInfo({ api_key: '_' }); + var req = flickr.places.getInfo({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.places.getInfoByUrl.js b/test/flickr.places.getInfoByUrl.js index a568982..56d3ffe 100644 --- a/test/flickr.places.getInfoByUrl.js +++ b/test/flickr.places.getInfoByUrl.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.places.getInfoByUrl', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.places.getInfoByUrl({ url: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "url"', function () { assert.throws(function () { - flickr.places.getInfoByUrl({ api_key: '_' }); + flickr.places.getInfoByUrl({}); }, function (err) { return err.message === 'Missing required argument "url"'; }); @@ -24,7 +14,7 @@ describe('flickr.places.getInfoByUrl', function () { }); it('returns a Request instance', function () { - var req = flickr.places.getInfoByUrl({ api_key: '_', url: '_' }); + var req = flickr.places.getInfoByUrl({ url: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.places.getPlaceTypes.js b/test/flickr.places.getPlaceTypes.js index 6b3c638..7d269a8 100644 --- a/test/flickr.places.getPlaceTypes.js +++ b/test/flickr.places.getPlaceTypes.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.places.getPlaceTypes', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.places.getPlaceTypes({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.places.getPlaceTypes({ api_key: '_' }); + var req = flickr.places.getPlaceTypes({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.places.getShapeHistory.js b/test/flickr.places.getShapeHistory.js index 6ba3c67..fc1b4b7 100644 --- a/test/flickr.places.getShapeHistory.js +++ b/test/flickr.places.getShapeHistory.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.places.getShapeHistory', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.places.getShapeHistory({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.places.getShapeHistory({ api_key: '_' }); + var req = flickr.places.getShapeHistory({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.places.getTopPlacesList.js b/test/flickr.places.getTopPlacesList.js index 94131ec..e16c9c1 100644 --- a/test/flickr.places.getTopPlacesList.js +++ b/test/flickr.places.getTopPlacesList.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.places.getTopPlacesList', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.places.getTopPlacesList({ place_type_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "place_type_id"', function () { assert.throws(function () { - flickr.places.getTopPlacesList({ api_key: '_' }); + flickr.places.getTopPlacesList({}); }, function (err) { return err.message === 'Missing required argument "place_type_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.places.getTopPlacesList', function () { }); it('returns a Request instance', function () { - var req = flickr.places.getTopPlacesList({ api_key: '_', place_type_id: '_' }); + var req = flickr.places.getTopPlacesList({ place_type_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.places.placesForBoundingBox.js b/test/flickr.places.placesForBoundingBox.js index fe00b8a..d851096 100644 --- a/test/flickr.places.placesForBoundingBox.js +++ b/test/flickr.places.placesForBoundingBox.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.places.placesForBoundingBox', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.places.placesForBoundingBox({ bbox: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "bbox"', function () { assert.throws(function () { - flickr.places.placesForBoundingBox({ api_key: '_' }); + flickr.places.placesForBoundingBox({}); }, function (err) { return err.message === 'Missing required argument "bbox"'; }); @@ -24,7 +14,7 @@ describe('flickr.places.placesForBoundingBox', function () { }); it('returns a Request instance', function () { - var req = flickr.places.placesForBoundingBox({ api_key: '_', bbox: '_' }); + var req = flickr.places.placesForBoundingBox({ bbox: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.places.placesForContacts.js b/test/flickr.places.placesForContacts.js index e50fc24..8a2056e 100644 --- a/test/flickr.places.placesForContacts.js +++ b/test/flickr.places.placesForContacts.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.places.placesForContacts', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.places.placesForContacts({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.places.placesForContacts({ api_key: '_' }); + var req = flickr.places.placesForContacts({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.places.placesForTags.js b/test/flickr.places.placesForTags.js index 09b8292..97f1ea1 100644 --- a/test/flickr.places.placesForTags.js +++ b/test/flickr.places.placesForTags.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.places.placesForTags', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.places.placesForTags({ place_type_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "place_type_id"', function () { assert.throws(function () { - flickr.places.placesForTags({ api_key: '_' }); + flickr.places.placesForTags({}); }, function (err) { return err.message === 'Missing required argument "place_type_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.places.placesForTags', function () { }); it('returns a Request instance', function () { - var req = flickr.places.placesForTags({ api_key: '_', place_type_id: '_' }); + var req = flickr.places.placesForTags({ place_type_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.places.placesForUser.js b/test/flickr.places.placesForUser.js index 7fce61b..84e553d 100644 --- a/test/flickr.places.placesForUser.js +++ b/test/flickr.places.placesForUser.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.places.placesForUser', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.places.placesForUser({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.places.placesForUser({ api_key: '_' }); + var req = flickr.places.placesForUser({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.places.resolvePlaceId.js b/test/flickr.places.resolvePlaceId.js index 6338f54..a44ad9d 100644 --- a/test/flickr.places.resolvePlaceId.js +++ b/test/flickr.places.resolvePlaceId.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.places.resolvePlaceId', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.places.resolvePlaceId({ place_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "place_id"', function () { assert.throws(function () { - flickr.places.resolvePlaceId({ api_key: '_' }); + flickr.places.resolvePlaceId({}); }, function (err) { return err.message === 'Missing required argument "place_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.places.resolvePlaceId', function () { }); it('returns a Request instance', function () { - var req = flickr.places.resolvePlaceId({ api_key: '_', place_id: '_' }); + var req = flickr.places.resolvePlaceId({ place_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.places.resolvePlaceURL.js b/test/flickr.places.resolvePlaceURL.js index 51a38bf..44088bd 100644 --- a/test/flickr.places.resolvePlaceURL.js +++ b/test/flickr.places.resolvePlaceURL.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.places.resolvePlaceURL', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.places.resolvePlaceURL({ url: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "url"', function () { assert.throws(function () { - flickr.places.resolvePlaceURL({ api_key: '_' }); + flickr.places.resolvePlaceURL({}); }, function (err) { return err.message === 'Missing required argument "url"'; }); @@ -24,7 +14,7 @@ describe('flickr.places.resolvePlaceURL', function () { }); it('returns a Request instance', function () { - var req = flickr.places.resolvePlaceURL({ api_key: '_', url: '_' }); + var req = flickr.places.resolvePlaceURL({ url: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.places.tagsForPlace.js b/test/flickr.places.tagsForPlace.js index a94e420..4998d0b 100644 --- a/test/flickr.places.tagsForPlace.js +++ b/test/flickr.places.tagsForPlace.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.places.tagsForPlace', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.places.tagsForPlace({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.places.tagsForPlace({ api_key: '_' }); + var req = flickr.places.tagsForPlace({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.prefs.getContentType.js b/test/flickr.prefs.getContentType.js index b761847..7c9a086 100644 --- a/test/flickr.prefs.getContentType.js +++ b/test/flickr.prefs.getContentType.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.prefs.getContentType', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.prefs.getContentType({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.prefs.getContentType({ api_key: '_' }); + var req = flickr.prefs.getContentType({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.prefs.getGeoPerms.js b/test/flickr.prefs.getGeoPerms.js index d61a5bd..907bf6c 100644 --- a/test/flickr.prefs.getGeoPerms.js +++ b/test/flickr.prefs.getGeoPerms.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.prefs.getGeoPerms', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.prefs.getGeoPerms({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.prefs.getGeoPerms({ api_key: '_' }); + var req = flickr.prefs.getGeoPerms({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.prefs.getHidden.js b/test/flickr.prefs.getHidden.js index a78421d..6716619 100644 --- a/test/flickr.prefs.getHidden.js +++ b/test/flickr.prefs.getHidden.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.prefs.getHidden', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.prefs.getHidden({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.prefs.getHidden({ api_key: '_' }); + var req = flickr.prefs.getHidden({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.prefs.getPrivacy.js b/test/flickr.prefs.getPrivacy.js index 426d3c9..3e5c6f8 100644 --- a/test/flickr.prefs.getPrivacy.js +++ b/test/flickr.prefs.getPrivacy.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.prefs.getPrivacy', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.prefs.getPrivacy({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.prefs.getPrivacy({ api_key: '_' }); + var req = flickr.prefs.getPrivacy({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.prefs.getSafetyLevel.js b/test/flickr.prefs.getSafetyLevel.js index 03d3b17..0da4f99 100644 --- a/test/flickr.prefs.getSafetyLevel.js +++ b/test/flickr.prefs.getSafetyLevel.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.prefs.getSafetyLevel', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.prefs.getSafetyLevel({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.prefs.getSafetyLevel({ api_key: '_' }); + var req = flickr.prefs.getSafetyLevel({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.push.getSubscriptions.js b/test/flickr.push.getSubscriptions.js index caefd81..56a8806 100644 --- a/test/flickr.push.getSubscriptions.js +++ b/test/flickr.push.getSubscriptions.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.push.getSubscriptions', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.push.getSubscriptions({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.push.getSubscriptions({ api_key: '_' }); + var req = flickr.push.getSubscriptions({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.push.getTopics.js b/test/flickr.push.getTopics.js index d6196f2..fb75637 100644 --- a/test/flickr.push.getTopics.js +++ b/test/flickr.push.getTopics.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.push.getTopics', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.push.getTopics({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.push.getTopics({ api_key: '_' }); + var req = flickr.push.getTopics({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.push.subscribe.js b/test/flickr.push.subscribe.js index b5407c2..3c15091 100644 --- a/test/flickr.push.subscribe.js +++ b/test/flickr.push.subscribe.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.push.subscribe', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.push.subscribe({ topic: '_', callback: '_', verify: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "topic"', function () { assert.throws(function () { - flickr.push.subscribe({ api_key: '_', callback: '_', verify: '_' }); + flickr.push.subscribe({ callback: '_', verify: '_' }); }, function (err) { return err.message === 'Missing required argument "topic"'; }); @@ -26,7 +16,7 @@ describe('flickr.push.subscribe', function () { it('requires "callback"', function () { assert.throws(function () { - flickr.push.subscribe({ api_key: '_', topic: '_', verify: '_' }); + flickr.push.subscribe({ topic: '_', verify: '_' }); }, function (err) { return err.message === 'Missing required argument "callback"'; }); @@ -36,7 +26,7 @@ describe('flickr.push.subscribe', function () { it('requires "verify"', function () { assert.throws(function () { - flickr.push.subscribe({ api_key: '_', topic: '_', callback: '_' }); + flickr.push.subscribe({ topic: '_', callback: '_' }); }, function (err) { return err.message === 'Missing required argument "verify"'; }); @@ -44,7 +34,7 @@ describe('flickr.push.subscribe', function () { }); it('returns a Request instance', function () { - var req = flickr.push.subscribe({ api_key: '_', topic: '_', callback: '_', verify: '_' }); + var req = flickr.push.subscribe({ topic: '_', callback: '_', verify: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.push.unsubscribe.js b/test/flickr.push.unsubscribe.js index b4573dd..9ce4109 100644 --- a/test/flickr.push.unsubscribe.js +++ b/test/flickr.push.unsubscribe.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.push.unsubscribe', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.push.unsubscribe({ topic: '_', callback: '_', verify: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "topic"', function () { assert.throws(function () { - flickr.push.unsubscribe({ api_key: '_', callback: '_', verify: '_' }); + flickr.push.unsubscribe({ callback: '_', verify: '_' }); }, function (err) { return err.message === 'Missing required argument "topic"'; }); @@ -26,7 +16,7 @@ describe('flickr.push.unsubscribe', function () { it('requires "callback"', function () { assert.throws(function () { - flickr.push.unsubscribe({ api_key: '_', topic: '_', verify: '_' }); + flickr.push.unsubscribe({ topic: '_', verify: '_' }); }, function (err) { return err.message === 'Missing required argument "callback"'; }); @@ -36,7 +26,7 @@ describe('flickr.push.unsubscribe', function () { it('requires "verify"', function () { assert.throws(function () { - flickr.push.unsubscribe({ api_key: '_', topic: '_', callback: '_' }); + flickr.push.unsubscribe({ topic: '_', callback: '_' }); }, function (err) { return err.message === 'Missing required argument "verify"'; }); @@ -44,7 +34,7 @@ describe('flickr.push.unsubscribe', function () { }); it('returns a Request instance', function () { - var req = flickr.push.unsubscribe({ api_key: '_', topic: '_', callback: '_', verify: '_' }); + var req = flickr.push.unsubscribe({ topic: '_', callback: '_', verify: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.reflection.getMethodInfo.js b/test/flickr.reflection.getMethodInfo.js index 4af733a..8c52646 100644 --- a/test/flickr.reflection.getMethodInfo.js +++ b/test/flickr.reflection.getMethodInfo.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.reflection.getMethodInfo', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.reflection.getMethodInfo({ method_name: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "method_name"', function () { assert.throws(function () { - flickr.reflection.getMethodInfo({ api_key: '_' }); + flickr.reflection.getMethodInfo({}); }, function (err) { return err.message === 'Missing required argument "method_name"'; }); @@ -24,7 +14,7 @@ describe('flickr.reflection.getMethodInfo', function () { }); it('returns a Request instance', function () { - var req = flickr.reflection.getMethodInfo({ api_key: '_', method_name: '_' }); + var req = flickr.reflection.getMethodInfo({ method_name: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.reflection.getMethods.js b/test/flickr.reflection.getMethods.js index aafd9bc..97a4f5a 100644 --- a/test/flickr.reflection.getMethods.js +++ b/test/flickr.reflection.getMethods.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.reflection.getMethods', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.reflection.getMethods({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.reflection.getMethods({ api_key: '_' }); + var req = flickr.reflection.getMethods({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.stats.getCSVFiles.js b/test/flickr.stats.getCSVFiles.js index c24f567..416c614 100644 --- a/test/flickr.stats.getCSVFiles.js +++ b/test/flickr.stats.getCSVFiles.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.stats.getCSVFiles', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.stats.getCSVFiles({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.stats.getCSVFiles({ api_key: '_' }); + var req = flickr.stats.getCSVFiles({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.stats.getCollectionDomains.js b/test/flickr.stats.getCollectionDomains.js index b8e1417..77e4d7d 100644 --- a/test/flickr.stats.getCollectionDomains.js +++ b/test/flickr.stats.getCollectionDomains.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.stats.getCollectionDomains', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.stats.getCollectionDomains({ date: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "date"', function () { assert.throws(function () { - flickr.stats.getCollectionDomains({ api_key: '_' }); + flickr.stats.getCollectionDomains({}); }, function (err) { return err.message === 'Missing required argument "date"'; }); @@ -24,7 +14,7 @@ describe('flickr.stats.getCollectionDomains', function () { }); it('returns a Request instance', function () { - var req = flickr.stats.getCollectionDomains({ api_key: '_', date: '_' }); + var req = flickr.stats.getCollectionDomains({ date: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.stats.getCollectionReferrers.js b/test/flickr.stats.getCollectionReferrers.js index 00f3c84..e964203 100644 --- a/test/flickr.stats.getCollectionReferrers.js +++ b/test/flickr.stats.getCollectionReferrers.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.stats.getCollectionReferrers', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.stats.getCollectionReferrers({ date: '_', domain: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "date"', function () { assert.throws(function () { - flickr.stats.getCollectionReferrers({ api_key: '_', domain: '_' }); + flickr.stats.getCollectionReferrers({ domain: '_' }); }, function (err) { return err.message === 'Missing required argument "date"'; }); @@ -26,7 +16,7 @@ describe('flickr.stats.getCollectionReferrers', function () { it('requires "domain"', function () { assert.throws(function () { - flickr.stats.getCollectionReferrers({ api_key: '_', date: '_' }); + flickr.stats.getCollectionReferrers({ date: '_' }); }, function (err) { return err.message === 'Missing required argument "domain"'; }); @@ -34,7 +24,7 @@ describe('flickr.stats.getCollectionReferrers', function () { }); it('returns a Request instance', function () { - var req = flickr.stats.getCollectionReferrers({ api_key: '_', date: '_', domain: '_' }); + var req = flickr.stats.getCollectionReferrers({ date: '_', domain: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.stats.getCollectionStats.js b/test/flickr.stats.getCollectionStats.js index b97d016..bbe5a09 100644 --- a/test/flickr.stats.getCollectionStats.js +++ b/test/flickr.stats.getCollectionStats.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.stats.getCollectionStats', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.stats.getCollectionStats({ date: '_', collection_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "date"', function () { assert.throws(function () { - flickr.stats.getCollectionStats({ api_key: '_', collection_id: '_' }); + flickr.stats.getCollectionStats({ collection_id: '_' }); }, function (err) { return err.message === 'Missing required argument "date"'; }); @@ -26,7 +16,7 @@ describe('flickr.stats.getCollectionStats', function () { it('requires "collection_id"', function () { assert.throws(function () { - flickr.stats.getCollectionStats({ api_key: '_', date: '_' }); + flickr.stats.getCollectionStats({ date: '_' }); }, function (err) { return err.message === 'Missing required argument "collection_id"'; }); @@ -34,7 +24,7 @@ describe('flickr.stats.getCollectionStats', function () { }); it('returns a Request instance', function () { - var req = flickr.stats.getCollectionStats({ api_key: '_', date: '_', collection_id: '_' }); + var req = flickr.stats.getCollectionStats({ date: '_', collection_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.stats.getPhotoDomains.js b/test/flickr.stats.getPhotoDomains.js index 14b0b46..e97d451 100644 --- a/test/flickr.stats.getPhotoDomains.js +++ b/test/flickr.stats.getPhotoDomains.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.stats.getPhotoDomains', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.stats.getPhotoDomains({ date: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "date"', function () { assert.throws(function () { - flickr.stats.getPhotoDomains({ api_key: '_' }); + flickr.stats.getPhotoDomains({}); }, function (err) { return err.message === 'Missing required argument "date"'; }); @@ -24,7 +14,7 @@ describe('flickr.stats.getPhotoDomains', function () { }); it('returns a Request instance', function () { - var req = flickr.stats.getPhotoDomains({ api_key: '_', date: '_' }); + var req = flickr.stats.getPhotoDomains({ date: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.stats.getPhotoReferrers.js b/test/flickr.stats.getPhotoReferrers.js index 33b41b8..6101415 100644 --- a/test/flickr.stats.getPhotoReferrers.js +++ b/test/flickr.stats.getPhotoReferrers.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.stats.getPhotoReferrers', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.stats.getPhotoReferrers({ date: '_', domain: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "date"', function () { assert.throws(function () { - flickr.stats.getPhotoReferrers({ api_key: '_', domain: '_' }); + flickr.stats.getPhotoReferrers({ domain: '_' }); }, function (err) { return err.message === 'Missing required argument "date"'; }); @@ -26,7 +16,7 @@ describe('flickr.stats.getPhotoReferrers', function () { it('requires "domain"', function () { assert.throws(function () { - flickr.stats.getPhotoReferrers({ api_key: '_', date: '_' }); + flickr.stats.getPhotoReferrers({ date: '_' }); }, function (err) { return err.message === 'Missing required argument "domain"'; }); @@ -34,7 +24,7 @@ describe('flickr.stats.getPhotoReferrers', function () { }); it('returns a Request instance', function () { - var req = flickr.stats.getPhotoReferrers({ api_key: '_', date: '_', domain: '_' }); + var req = flickr.stats.getPhotoReferrers({ date: '_', domain: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.stats.getPhotoStats.js b/test/flickr.stats.getPhotoStats.js index bba967c..ad97df5 100644 --- a/test/flickr.stats.getPhotoStats.js +++ b/test/flickr.stats.getPhotoStats.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.stats.getPhotoStats', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.stats.getPhotoStats({ date: '_', photo_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "date"', function () { assert.throws(function () { - flickr.stats.getPhotoStats({ api_key: '_', photo_id: '_' }); + flickr.stats.getPhotoStats({ photo_id: '_' }); }, function (err) { return err.message === 'Missing required argument "date"'; }); @@ -26,7 +16,7 @@ describe('flickr.stats.getPhotoStats', function () { it('requires "photo_id"', function () { assert.throws(function () { - flickr.stats.getPhotoStats({ api_key: '_', date: '_' }); + flickr.stats.getPhotoStats({ date: '_' }); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -34,7 +24,7 @@ describe('flickr.stats.getPhotoStats', function () { }); it('returns a Request instance', function () { - var req = flickr.stats.getPhotoStats({ api_key: '_', date: '_', photo_id: '_' }); + var req = flickr.stats.getPhotoStats({ date: '_', photo_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.stats.getPhotosetDomains.js b/test/flickr.stats.getPhotosetDomains.js index 2a64bcf..f108017 100644 --- a/test/flickr.stats.getPhotosetDomains.js +++ b/test/flickr.stats.getPhotosetDomains.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.stats.getPhotosetDomains', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.stats.getPhotosetDomains({ date: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "date"', function () { assert.throws(function () { - flickr.stats.getPhotosetDomains({ api_key: '_' }); + flickr.stats.getPhotosetDomains({}); }, function (err) { return err.message === 'Missing required argument "date"'; }); @@ -24,7 +14,7 @@ describe('flickr.stats.getPhotosetDomains', function () { }); it('returns a Request instance', function () { - var req = flickr.stats.getPhotosetDomains({ api_key: '_', date: '_' }); + var req = flickr.stats.getPhotosetDomains({ date: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.stats.getPhotosetReferrers.js b/test/flickr.stats.getPhotosetReferrers.js index 48c53d3..2bab94a 100644 --- a/test/flickr.stats.getPhotosetReferrers.js +++ b/test/flickr.stats.getPhotosetReferrers.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.stats.getPhotosetReferrers', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.stats.getPhotosetReferrers({ date: '_', domain: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "date"', function () { assert.throws(function () { - flickr.stats.getPhotosetReferrers({ api_key: '_', domain: '_' }); + flickr.stats.getPhotosetReferrers({ domain: '_' }); }, function (err) { return err.message === 'Missing required argument "date"'; }); @@ -26,7 +16,7 @@ describe('flickr.stats.getPhotosetReferrers', function () { it('requires "domain"', function () { assert.throws(function () { - flickr.stats.getPhotosetReferrers({ api_key: '_', date: '_' }); + flickr.stats.getPhotosetReferrers({ date: '_' }); }, function (err) { return err.message === 'Missing required argument "domain"'; }); @@ -34,7 +24,7 @@ describe('flickr.stats.getPhotosetReferrers', function () { }); it('returns a Request instance', function () { - var req = flickr.stats.getPhotosetReferrers({ api_key: '_', date: '_', domain: '_' }); + var req = flickr.stats.getPhotosetReferrers({ date: '_', domain: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.stats.getPhotosetStats.js b/test/flickr.stats.getPhotosetStats.js index c649d6d..94133b2 100644 --- a/test/flickr.stats.getPhotosetStats.js +++ b/test/flickr.stats.getPhotosetStats.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.stats.getPhotosetStats', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.stats.getPhotosetStats({ date: '_', photoset_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "date"', function () { assert.throws(function () { - flickr.stats.getPhotosetStats({ api_key: '_', photoset_id: '_' }); + flickr.stats.getPhotosetStats({ photoset_id: '_' }); }, function (err) { return err.message === 'Missing required argument "date"'; }); @@ -26,7 +16,7 @@ describe('flickr.stats.getPhotosetStats', function () { it('requires "photoset_id"', function () { assert.throws(function () { - flickr.stats.getPhotosetStats({ api_key: '_', date: '_' }); + flickr.stats.getPhotosetStats({ date: '_' }); }, function (err) { return err.message === 'Missing required argument "photoset_id"'; }); @@ -34,7 +24,7 @@ describe('flickr.stats.getPhotosetStats', function () { }); it('returns a Request instance', function () { - var req = flickr.stats.getPhotosetStats({ api_key: '_', date: '_', photoset_id: '_' }); + var req = flickr.stats.getPhotosetStats({ date: '_', photoset_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.stats.getPhotostreamDomains.js b/test/flickr.stats.getPhotostreamDomains.js index 53a9fb6..e45f524 100644 --- a/test/flickr.stats.getPhotostreamDomains.js +++ b/test/flickr.stats.getPhotostreamDomains.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.stats.getPhotostreamDomains', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.stats.getPhotostreamDomains({ date: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "date"', function () { assert.throws(function () { - flickr.stats.getPhotostreamDomains({ api_key: '_' }); + flickr.stats.getPhotostreamDomains({}); }, function (err) { return err.message === 'Missing required argument "date"'; }); @@ -24,7 +14,7 @@ describe('flickr.stats.getPhotostreamDomains', function () { }); it('returns a Request instance', function () { - var req = flickr.stats.getPhotostreamDomains({ api_key: '_', date: '_' }); + var req = flickr.stats.getPhotostreamDomains({ date: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.stats.getPhotostreamReferrers.js b/test/flickr.stats.getPhotostreamReferrers.js index bf791b1..389c6fb 100644 --- a/test/flickr.stats.getPhotostreamReferrers.js +++ b/test/flickr.stats.getPhotostreamReferrers.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.stats.getPhotostreamReferrers', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.stats.getPhotostreamReferrers({ date: '_', domain: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "date"', function () { assert.throws(function () { - flickr.stats.getPhotostreamReferrers({ api_key: '_', domain: '_' }); + flickr.stats.getPhotostreamReferrers({ domain: '_' }); }, function (err) { return err.message === 'Missing required argument "date"'; }); @@ -26,7 +16,7 @@ describe('flickr.stats.getPhotostreamReferrers', function () { it('requires "domain"', function () { assert.throws(function () { - flickr.stats.getPhotostreamReferrers({ api_key: '_', date: '_' }); + flickr.stats.getPhotostreamReferrers({ date: '_' }); }, function (err) { return err.message === 'Missing required argument "domain"'; }); @@ -34,7 +24,7 @@ describe('flickr.stats.getPhotostreamReferrers', function () { }); it('returns a Request instance', function () { - var req = flickr.stats.getPhotostreamReferrers({ api_key: '_', date: '_', domain: '_' }); + var req = flickr.stats.getPhotostreamReferrers({ date: '_', domain: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.stats.getPhotostreamStats.js b/test/flickr.stats.getPhotostreamStats.js index 54d2b65..1af323e 100644 --- a/test/flickr.stats.getPhotostreamStats.js +++ b/test/flickr.stats.getPhotostreamStats.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.stats.getPhotostreamStats', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.stats.getPhotostreamStats({ date: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "date"', function () { assert.throws(function () { - flickr.stats.getPhotostreamStats({ api_key: '_' }); + flickr.stats.getPhotostreamStats({}); }, function (err) { return err.message === 'Missing required argument "date"'; }); @@ -24,7 +14,7 @@ describe('flickr.stats.getPhotostreamStats', function () { }); it('returns a Request instance', function () { - var req = flickr.stats.getPhotostreamStats({ api_key: '_', date: '_' }); + var req = flickr.stats.getPhotostreamStats({ date: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.stats.getPopularPhotos.js b/test/flickr.stats.getPopularPhotos.js index 7f038ee..976e481 100644 --- a/test/flickr.stats.getPopularPhotos.js +++ b/test/flickr.stats.getPopularPhotos.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.stats.getPopularPhotos', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.stats.getPopularPhotos({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.stats.getPopularPhotos({ api_key: '_' }); + var req = flickr.stats.getPopularPhotos({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.stats.getTotalViews.js b/test/flickr.stats.getTotalViews.js index d7a03d2..db5c850 100644 --- a/test/flickr.stats.getTotalViews.js +++ b/test/flickr.stats.getTotalViews.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.stats.getTotalViews', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.stats.getTotalViews({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.stats.getTotalViews({ api_key: '_' }); + var req = flickr.stats.getTotalViews({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.tags.getClusterPhotos.js b/test/flickr.tags.getClusterPhotos.js index d9bafda..e5dd364 100644 --- a/test/flickr.tags.getClusterPhotos.js +++ b/test/flickr.tags.getClusterPhotos.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.tags.getClusterPhotos', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.tags.getClusterPhotos({ tag: '_', cluster_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "tag"', function () { assert.throws(function () { - flickr.tags.getClusterPhotos({ api_key: '_', cluster_id: '_' }); + flickr.tags.getClusterPhotos({ cluster_id: '_' }); }, function (err) { return err.message === 'Missing required argument "tag"'; }); @@ -26,7 +16,7 @@ describe('flickr.tags.getClusterPhotos', function () { it('requires "cluster_id"', function () { assert.throws(function () { - flickr.tags.getClusterPhotos({ api_key: '_', tag: '_' }); + flickr.tags.getClusterPhotos({ tag: '_' }); }, function (err) { return err.message === 'Missing required argument "cluster_id"'; }); @@ -34,7 +24,7 @@ describe('flickr.tags.getClusterPhotos', function () { }); it('returns a Request instance', function () { - var req = flickr.tags.getClusterPhotos({ api_key: '_', tag: '_', cluster_id: '_' }); + var req = flickr.tags.getClusterPhotos({ tag: '_', cluster_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.tags.getClusters.js b/test/flickr.tags.getClusters.js index a039d30..86fd6da 100644 --- a/test/flickr.tags.getClusters.js +++ b/test/flickr.tags.getClusters.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.tags.getClusters', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.tags.getClusters({ tag: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "tag"', function () { assert.throws(function () { - flickr.tags.getClusters({ api_key: '_' }); + flickr.tags.getClusters({}); }, function (err) { return err.message === 'Missing required argument "tag"'; }); @@ -24,7 +14,7 @@ describe('flickr.tags.getClusters', function () { }); it('returns a Request instance', function () { - var req = flickr.tags.getClusters({ api_key: '_', tag: '_' }); + var req = flickr.tags.getClusters({ tag: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.tags.getHotList.js b/test/flickr.tags.getHotList.js index 0569315..0857af3 100644 --- a/test/flickr.tags.getHotList.js +++ b/test/flickr.tags.getHotList.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.tags.getHotList', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.tags.getHotList({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.tags.getHotList({ api_key: '_' }); + var req = flickr.tags.getHotList({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.tags.getListPhoto.js b/test/flickr.tags.getListPhoto.js index ac4df41..7ed5690 100644 --- a/test/flickr.tags.getListPhoto.js +++ b/test/flickr.tags.getListPhoto.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.tags.getListPhoto', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.tags.getListPhoto({ photo_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "photo_id"', function () { assert.throws(function () { - flickr.tags.getListPhoto({ api_key: '_' }); + flickr.tags.getListPhoto({}); }, function (err) { return err.message === 'Missing required argument "photo_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.tags.getListPhoto', function () { }); it('returns a Request instance', function () { - var req = flickr.tags.getListPhoto({ api_key: '_', photo_id: '_' }); + var req = flickr.tags.getListPhoto({ photo_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.tags.getListUser.js b/test/flickr.tags.getListUser.js index c8453f2..30debd5 100644 --- a/test/flickr.tags.getListUser.js +++ b/test/flickr.tags.getListUser.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.tags.getListUser', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.tags.getListUser({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.tags.getListUser({ api_key: '_' }); + var req = flickr.tags.getListUser({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.tags.getListUserPopular.js b/test/flickr.tags.getListUserPopular.js index e10aefe..c647611 100644 --- a/test/flickr.tags.getListUserPopular.js +++ b/test/flickr.tags.getListUserPopular.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.tags.getListUserPopular', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.tags.getListUserPopular({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.tags.getListUserPopular({ api_key: '_' }); + var req = flickr.tags.getListUserPopular({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.tags.getListUserRaw.js b/test/flickr.tags.getListUserRaw.js index 3c0fe85..d3ead66 100644 --- a/test/flickr.tags.getListUserRaw.js +++ b/test/flickr.tags.getListUserRaw.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.tags.getListUserRaw', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.tags.getListUserRaw({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.tags.getListUserRaw({ api_key: '_' }); + var req = flickr.tags.getListUserRaw({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.tags.getMostFrequentlyUsed.js b/test/flickr.tags.getMostFrequentlyUsed.js index d03f565..ddc67b7 100644 --- a/test/flickr.tags.getMostFrequentlyUsed.js +++ b/test/flickr.tags.getMostFrequentlyUsed.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.tags.getMostFrequentlyUsed', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.tags.getMostFrequentlyUsed({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.tags.getMostFrequentlyUsed({ api_key: '_' }); + var req = flickr.tags.getMostFrequentlyUsed({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.tags.getRelated.js b/test/flickr.tags.getRelated.js index fb4caa5..f5afb04 100644 --- a/test/flickr.tags.getRelated.js +++ b/test/flickr.tags.getRelated.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.tags.getRelated', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.tags.getRelated({ tag: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "tag"', function () { assert.throws(function () { - flickr.tags.getRelated({ api_key: '_' }); + flickr.tags.getRelated({}); }, function (err) { return err.message === 'Missing required argument "tag"'; }); @@ -24,7 +14,7 @@ describe('flickr.tags.getRelated', function () { }); it('returns a Request instance', function () { - var req = flickr.tags.getRelated({ api_key: '_', tag: '_' }); + var req = flickr.tags.getRelated({ tag: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.test.echo.js b/test/flickr.test.echo.js index 7229089..70145c3 100644 --- a/test/flickr.test.echo.js +++ b/test/flickr.test.echo.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.test.echo', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.test.echo({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.test.echo({ api_key: '_' }); + var req = flickr.test.echo({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.test.login.js b/test/flickr.test.login.js index acd8896..b06f2b0 100644 --- a/test/flickr.test.login.js +++ b/test/flickr.test.login.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.test.login', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.test.login({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.test.login({ api_key: '_' }); + var req = flickr.test.login({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.test.null.js b/test/flickr.test.null.js index 36ae6a0..d0ceb98 100644 --- a/test/flickr.test.null.js +++ b/test/flickr.test.null.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.test.null', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.test.null({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.test.null({ api_key: '_' }); + var req = flickr.test.null({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.urls.getGroup.js b/test/flickr.urls.getGroup.js index 7081572..6ecb25a 100644 --- a/test/flickr.urls.getGroup.js +++ b/test/flickr.urls.getGroup.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.urls.getGroup', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.urls.getGroup({ group_id: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "group_id"', function () { assert.throws(function () { - flickr.urls.getGroup({ api_key: '_' }); + flickr.urls.getGroup({}); }, function (err) { return err.message === 'Missing required argument "group_id"'; }); @@ -24,7 +14,7 @@ describe('flickr.urls.getGroup', function () { }); it('returns a Request instance', function () { - var req = flickr.urls.getGroup({ api_key: '_', group_id: '_' }); + var req = flickr.urls.getGroup({ group_id: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.urls.getUserPhotos.js b/test/flickr.urls.getUserPhotos.js index 375a690..60e8b8f 100644 --- a/test/flickr.urls.getUserPhotos.js +++ b/test/flickr.urls.getUserPhotos.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.urls.getUserPhotos', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.urls.getUserPhotos({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.urls.getUserPhotos({ api_key: '_' }); + var req = flickr.urls.getUserPhotos({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.urls.getUserProfile.js b/test/flickr.urls.getUserProfile.js index 4d43caf..b040a29 100644 --- a/test/flickr.urls.getUserProfile.js +++ b/test/flickr.urls.getUserProfile.js @@ -3,18 +3,8 @@ var assert = require('assert'); describe('flickr.urls.getUserProfile', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.urls.getUserProfile({}); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('returns a Request instance', function () { - var req = flickr.urls.getUserProfile({ api_key: '_' }); + var req = flickr.urls.getUserProfile({}); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.urls.lookupGallery.js b/test/flickr.urls.lookupGallery.js index c166f1c..b24fb0e 100644 --- a/test/flickr.urls.lookupGallery.js +++ b/test/flickr.urls.lookupGallery.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.urls.lookupGallery', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.urls.lookupGallery({ url: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "url"', function () { assert.throws(function () { - flickr.urls.lookupGallery({ api_key: '_' }); + flickr.urls.lookupGallery({}); }, function (err) { return err.message === 'Missing required argument "url"'; }); @@ -24,7 +14,7 @@ describe('flickr.urls.lookupGallery', function () { }); it('returns a Request instance', function () { - var req = flickr.urls.lookupGallery({ api_key: '_', url: '_' }); + var req = flickr.urls.lookupGallery({ url: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.urls.lookupGroup.js b/test/flickr.urls.lookupGroup.js index d83b11e..305e43b 100644 --- a/test/flickr.urls.lookupGroup.js +++ b/test/flickr.urls.lookupGroup.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.urls.lookupGroup', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.urls.lookupGroup({ url: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "url"', function () { assert.throws(function () { - flickr.urls.lookupGroup({ api_key: '_' }); + flickr.urls.lookupGroup({}); }, function (err) { return err.message === 'Missing required argument "url"'; }); @@ -24,7 +14,7 @@ describe('flickr.urls.lookupGroup', function () { }); it('returns a Request instance', function () { - var req = flickr.urls.lookupGroup({ api_key: '_', url: '_' }); + var req = flickr.urls.lookupGroup({ url: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest'); diff --git a/test/flickr.urls.lookupUser.js b/test/flickr.urls.lookupUser.js index 882764a..2f487bd 100644 --- a/test/flickr.urls.lookupUser.js +++ b/test/flickr.urls.lookupUser.js @@ -3,20 +3,10 @@ var assert = require('assert'); describe('flickr.urls.lookupUser', function () { - it('requires "api_key"', function () { - - assert.throws(function () { - flickr.urls.lookupUser({ url: '_' }); - }, function (err) { - return err.message === 'Missing required argument "api_key"'; - }); - - }); - it('requires "url"', function () { assert.throws(function () { - flickr.urls.lookupUser({ api_key: '_' }); + flickr.urls.lookupUser({}); }, function (err) { return err.message === 'Missing required argument "url"'; }); @@ -24,7 +14,7 @@ describe('flickr.urls.lookupUser', function () { }); it('returns a Request instance', function () { - var req = flickr.urls.lookupUser({ api_key: '_', url: '_' }); + var req = flickr.urls.lookupUser({ url: '_' }); assert.equal(req.method, 'GET'); assert.equal(req.url, 'https://api.flickr.com/services/rest');