0

when using xxx shouldnt my fixture methods be aware of this.userId if I am logged in?

'userId': function () {
      console.log("#################");
      console.log("################# USERID: ", this.userId);
      console.log("#################");
    }

This always prints null when called from a step definition.

Gravity123
  • 1,130
  • 3
  • 21
  • 39

1 Answers1

1

if you are calling this from a step definition using this.server.call you are making a server to server connection therefore you won't be logged in.

You need to use the client to make a call to be authenticated:

this.client.executeAsync(function() {
  Meteor.call('userId') // this will be sent from the client
});
Xolv.io
  • 2,483
  • 1
  • 15
  • 17