MCPcopy
hub / github.com/strongloop/loopback / givenLoggedInUser

Function givenLoggedInUser

test/rest.middleware.test.js:283–292  ·  view source on GitHub ↗
(cb, done)

Source from the content-addressed store, hash-verified

281 }
282
283 function givenLoggedInUser(cb, done) {
284 const credentials = {email: 'user@example.com', password: 'pwd'};
285 const User = app.models.User;
286 User.create(credentials,
287 function(err, user) {
288 if (err) return done(err);
289
290 User.login(credentials, cb);
291 });
292 }
293
294 describe('shared methods', function() {
295 function getFixturePath(dirName) {

Callers 1

Calls 1

doneFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…