Merge pull request #4050 from overleaf/ta-set-user-property
Send 'created-at' User Property GitOrigin-RevId: 2a6c8356f0a64ffbc55eac485bb80c38b326f683
This commit is contained in:
@@ -43,6 +43,7 @@ describe('UserCreator', function () {
|
||||
}),
|
||||
'../Analytics/AnalyticsManager': (this.Analytics = {
|
||||
recordEvent: sinon.stub(),
|
||||
setUserProperty: sinon.stub(),
|
||||
}),
|
||||
'./UserOnboardingEmailManager': (this.UserOnboardingEmailManager = {
|
||||
scheduleOnboardingEmail: sinon.stub(),
|
||||
@@ -261,7 +262,7 @@ describe('UserCreator', function () {
|
||||
assert.equal(user.emails[0].samlProviderId, '1')
|
||||
})
|
||||
|
||||
it('should fire an analytics event on registration', async function () {
|
||||
it('should fire an analytics event and user property on registration', async function () {
|
||||
const user = await this.UserCreator.promises.createNewUser({
|
||||
email: this.email,
|
||||
})
|
||||
@@ -271,6 +272,11 @@ describe('UserCreator', function () {
|
||||
user._id,
|
||||
'user-registered'
|
||||
)
|
||||
sinon.assert.calledWith(
|
||||
this.Analytics.setUserProperty,
|
||||
user._id,
|
||||
'created-at'
|
||||
)
|
||||
})
|
||||
|
||||
it('should schedule an onboarding email on registration', async function () {
|
||||
|
||||
Reference in New Issue
Block a user