您最多选择25个主题
主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
20 行
512 B
20 行
512 B
import { Meteor } from 'meteor/meteor';
|
|
import { assert } from 'chai';
|
|
import Links from '../collections/Links.js';
|
|
import './methods.js';
|
|
|
|
if (Meteor.isServer) {
|
|
describe('method: createLink', function () {
|
|
beforeEach(function () {
|
|
Links.remove({});
|
|
});
|
|
|
|
it('can add a new link', function () {
|
|
const addLink = Meteor.server.method_handlers['createLink'];
|
|
|
|
addLink.apply({}, ['meteor.com', 'https://www.meteor.com']);
|
|
|
|
assert.equal(Links.find().count(), 1);
|
|
});
|
|
});
|
|
}
|
|
|