mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
remove validation test
This commit is contained in:
@@ -23,32 +23,5 @@ if (Meteor.isServer) {
|
||||
|
||||
assert.equal(Links.find().count(), 1);
|
||||
});
|
||||
|
||||
it('insert link method validation', function () {
|
||||
const addLink = Meteor.server.method_handlers['links.insert'];
|
||||
|
||||
let errors = 0;
|
||||
|
||||
// Check url is String
|
||||
try {
|
||||
addLink.apply({}, ['meteor.com', 2]);
|
||||
} catch (e) {
|
||||
errors += 1;
|
||||
}
|
||||
// Check title is String
|
||||
try {
|
||||
addLink.apply({}, [1, 'meteor.com']);
|
||||
} catch (e) {
|
||||
errors += 1;
|
||||
}
|
||||
// Check url is valid
|
||||
try {
|
||||
addLink.apply({}, ['meteor.com', 'meteor.com']);
|
||||
} catch (e) {
|
||||
errors += 1;
|
||||
}
|
||||
|
||||
assert.equal(errors, 3);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user