MCPcopy Create free account
hub / github.com/codecombat/codecombat / makeUser

Function makeUser

test/app/factories.coco.js:104–120  ·  view source on GitHub ↗
(attrs, sources)

Source from the content-addressed store, hash-verified

102 },
103
104 makeUser(attrs, sources) {
105 if (sources == null) { sources = {}; }
106 const _id = _.uniqueId('user_');
107 attrs = _.extend({
108 _id,
109 permissions: [],
110 email: _id+'@email.com',
111 anonymous: false,
112 name: _.string.humanize(_id)
113 }, attrs);
114
115 if (sources.prepaid) {
116 attrs.products = [sources.prepaid.convertToProduct()];
117 }
118
119 return new User(attrs);
120 },
121
122 makeClassroom(attrs, sources) {
123 let courseAttrs;

Callers

nothing calls this directly

Calls 1

convertToProductMethod · 0.80

Tested by

no test coverage detected