Esempio n. 1
0
        public void CheckThatIsPossibleToChangePasswordByApi()
        {
            Context.Token = new AuthRequests().SendRequestSignUpPost(new ClientSignUpModel
            {
                Email       = USER_EMAIL + DateTime.Now.ToString("ddmmyyyyhhmmss"),
                Password    = PASSWORD,
                FirstName   = "sdfsadfsf",
                LastName    = "asdadasdsad",
                PhoneNumber = "1231231231"
            }).TokenData.Token;

            var token = new PasswordRequests().SendRequestChangePassword(
                new PasswordModel
            {
                NewPassword = "******",
                OldPassword = PASSWORD
            });

            Assert.That(token.Contains("token"));
        }
Esempio n. 2
0
        public void CheckThatIsPossibleToChangePasswordByApi()
        {
            var leadRegistrationData = new ClientSignUpModel
            {
                Email       = USER_EMAIL + DateTime.Now.ToString("ddmmyyyyhhmmss"),
                Password    = PASSWORD,
                FirstName   = "qweqwe",
                LastName    = "qweqweqwe",
                PhoneNumber = "1431231231"
            };

            var authRequests = new AuthRequests();
            var leadRegistrationResponseData = authRequests.SendRequestSignUpPost(leadRegistrationData);

            Context.Token = leadRegistrationResponseData.TokenData.Token;

            var response = new PasswordRequests().SendRequestChangePassword(new PasswordModel
            {
                OldPassword = PASSWORD,
                NewPassword = "******"
            });

            Assert.IsTrue(response.Contains(Context.Token));
        }