I have some server methods that requires logged in user. Simply:
'myServerMethod': function () {
var user = Meteor.user();
if(!user) {
return null;
}
//do some action
}
Now, I want to test this method (Server Integration Test). How would I create user for my server test purpose? I am using Meteor with Velocity.
This is the method which tests if there are any users and if there are not it creates one:
You could use it to test if there are users.