fix meteor/meteor-tests.ts

This commit is contained in:
vvakame
2016-02-23 11:29:53 +09:00
parent 1314ebcfb0
commit 5cbf18d2df
+8 -5
View File
@@ -131,12 +131,15 @@ Meteor.methods({
/**
* From Methods, Meteor.Error section
*/
throw new Meteor.Error("logged-out",
"The user must be logged in to post a comment.");
throw new Meteor.Error(403,
"The user must be logged in to post a comment.");
if (Math.random() < 0.5) {
throw new Meteor.Error("logged-out",
"The user must be logged in to post a comment.");
}
if (Math.random() < 0.5) {
throw new Meteor.Error(403,
"The user must be logged in to post a comment.");
}
Meteor.call("methodName", function (error: Meteor.Error) {
if (error.error === "logged-out") {