diff --git a/lib/endpoints.json b/lib/endpoints.json index 6a0fc30..de42b4b 100644 --- a/lib/endpoints.json +++ b/lib/endpoints.json @@ -37,6 +37,7 @@ , "Videos" : { "resource": "movie/:id/videos", "method": "get" } , "Keywords" : { "resource": "movie/:id/keywords", "method": "get" } , "Releases" : { "resource":"movie/:id/releases", "method": "get" } + , "ReleaseDates" : { "resource":"movie/:id/release_dates", "method": "get" } , "Trailers" : { "resource": "movie/:id/trailers", "method": "get" } , "Translations" : { "resource": "movie/:id/translations", "method": "get" } , "Similar" : { "resource": "movie/:id/similar_movies", "method": "get" } diff --git a/test/index.js b/test/index.js index 0077363..2a93372 100644 --- a/test/index.js +++ b/test/index.js @@ -10,7 +10,7 @@ var api; * the proper way to run the test * * npm test --key='{your api key}' - * + * * @param {[type]} !apiKey || apiKey.length [description] * @return {[type]} [description] */ @@ -61,4 +61,15 @@ describe('moviedb', function() { }); }); -}); \ No newline at end of file + it ('should get the movie release dates', function(done) { + api.movieReleaseDates({id: 209112}, function(err, res) { + if (err) done(err); + res.should.be.an('object'); + res.should.have.property('results'); + res.results.should.be.an('array'); + assert.equal(res.id, 209112); + done(); + }); + }); + +});