Skip to content

Commit

Permalink
change demo.gitlab.com
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Jun 29, 2013
1 parent 120f7ee commit b87bb89
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Expand Up @@ -3,5 +3,4 @@ node_js:
- '0.11'
- '0.10'
- 0.8
- 0.6
script: make test-coveralls
2 changes: 1 addition & 1 deletion lib/client.js
Expand Up @@ -79,7 +79,7 @@ RESTFulClient.prototype.handleResult = function (err, result, res, callback) {
err.statusCode = statusCode;
}

callback(null, result);
callback(err, result);
};

RESTFulClient.prototype.request = function (method, pathname, data, callback, timeout) {
Expand Down
14 changes: 7 additions & 7 deletions test/client.test.js
Expand Up @@ -15,7 +15,7 @@ var should = require('should');

describe('client.test.js', function () {

var gitlab = new Gitlab({token: 'enEWf516mA168tP6BiVe', requestTimeout: 9000});
var gitlab = new Gitlab({token: 'xD2u7qqskGczXKZ7Mum9', requestTimeout: 9000});

describe('RESTfulClient', function () {
describe('request()', function () {
Expand Down Expand Up @@ -56,14 +56,14 @@ describe('client.test.js', function () {

describe('get()', function () {
it('should get a project', function (done) {
gitlab.projects.get({id: 2298}, function (err, result) {
gitlab.projects.get({id: 1}, function (err, result) {
should.not.exists(err);
should.exists(result);
result.name.should.equal('fawave');
result.id.should.equal(2298);
result.path_with_namespace.should.equal('fengmk2/fawave');
result.created_at.should.equal('2013-02-06T02:40:48Z');
console.log(new Date(result.created_at));
result.name.should.equal('Diaspora');
result.id.should.equal(1);
result.path_with_namespace.should.equal('diaspora/diaspora');
result.created_at.should.equal('2012-12-21T12:57:47Z');
new Date(result.created_at).should.be.instanceof(Date);
done();
});
});
Expand Down
2 changes: 1 addition & 1 deletion test/gitlab_client.js
Expand Up @@ -20,7 +20,7 @@ util.inherits(Project, restful.RESTFulResource);

function Gitlab(options) {
options = options || {};
options.api = options.api || 'https://gitlab.com/api/v3';
options.api = options.api || 'http://demo.gitlab.com/api/v3';
this.constructor.super_.call(this, options);
this.token = options.token;

Expand Down

0 comments on commit b87bb89

Please sign in to comment.