var config = require('./config.conf');
var YouTube = require('../lib/youtube');
var should = require('should');

describe('Youtube', function() {
  this.timeout(10000);
  it('Require key', function(done) {
    var youTube = new YouTube();
    youTube.search(config.query, 1, function(response) {
      response.should.have.property('error', {message: 'Please set a key using setKey method. Get an key in https://console.developers.google.com'});
      done();
    });
  })
  it('getById', function(done) {
    var youTube = new YouTube();
    youTube.setKey(config.key);
    youTube.getById(config.id, function(response) {
      response.should.have.property('kind', 'youtube#videoListResponse');
      done();
    });
  })
  it('search', function(done) {
    var youTube = new YouTube();
    youTube.setKey(config.key);
    youTube.search(config.query, 1, function(response) {
      response.should.have.property('kind', 'youtube#searchListResponse');
      done();
    });
  })
  it('related', function(done) {
    var youTube = new YouTube();
    youTube.setKey(config.key);
    youTube.related(config.id, 1, function(response) {
      response.should.have.property('kind', 'youtube#searchListResponse');
      done();
    });
  })
})

@@ -269,32 +269,37 @@
 ry, 1, function(
+err, 
 response) %7B%0A    
@@ -296,32 +296,27 @@
 se) %7B%0A      
-response
+err
 .should.have
@@ -462,24 +462,25 @@
    %7D);%0A  %7D)%0A
+%0A
   it('getByI
@@ -597,32 +597,37 @@
 ig.id, function(
+err, 
 response) %7B%0A    
@@ -857,32 +857,37 @@
 ry, 1, function(
+err, 
 response) %7B%0A    
@@ -1074,32 +1074,32 @@
 ey(config.key);%0A
-
     youTube.rela
@@ -1125,16 +1125,21 @@
 unction(
+err, 
 response

update test scripts