signup: fix email sent logic for tempuser
Fixes #8656 and properly sets the email_sent and email_sent_on fields for a tempuser (signup user).
This commit is contained in:
@@ -54,6 +54,19 @@ func TestTempUserCommandsAndQueries(t *testing.T) {
|
||||
So(err, ShouldBeNil)
|
||||
})
|
||||
|
||||
Convey("Should be able update email sent and email sent on", func() {
|
||||
cmd3 := m.UpdateTempUserWithEmailSentCommand{Code: cmd.Result.Code}
|
||||
err := UpdateTempUserWithEmailSent(&cmd3)
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
query := m.GetTempUsersQuery{OrgId: 2256, Status: m.TmpUserInvitePending}
|
||||
err = GetTempUsersQuery(&query)
|
||||
|
||||
So(err, ShouldBeNil)
|
||||
So(query.Result[0].EmailSent, ShouldBeTrue)
|
||||
So(query.Result[0].EmailSentOn, ShouldHappenOnOrAfter, (query.Result[0].Created))
|
||||
})
|
||||
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user