Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from fengmk2/tag-module-id
add module_id to tag table. #46
- Loading branch information
Showing
4 changed files
with
68 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/**! | ||
* cnpmjs.org - test/proxy/module.test.js | ||
* | ||
* Copyright(c) cnpmjs.org and other contributors. | ||
* MIT Licensed | ||
* | ||
* Authors: | ||
* fengmk2 <fengmk2@gmail.com> (http://fengmk2.github.com) | ||
*/ | ||
|
||
'use strict'; | ||
|
||
/** | ||
* Module dependencies. | ||
*/ | ||
|
||
var should = require('should'); | ||
var mm = require('mm'); | ||
var mysql = require('../../common/mysql'); | ||
var Module = require('../../proxy/module'); | ||
|
||
describe('proxy/module.test.js', function () { | ||
afterEach(mm.restore); | ||
|
||
describe('addTag()', function () { | ||
it('should add tag auto add module id', function (done) { | ||
Module.addTag('mocha', 'test', '1.15.1', function (err, result) { | ||
should.not.exist(err); | ||
result.should.have.keys('id', 'gmt_modified', 'module_id'); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
}); |