Skip to content

Commit ccc19ad

Browse files
committed
Tweak test with special char
1 parent 2557ea6 commit ccc19ad

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

spec/ValidationAndPasswordsReset.spec.js

+14-15
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ describe("Custom Pages Configuration", () => {
2323
},
2424
publicServerURL: "https://my.public.server.com/1"
2525
});
26-
26+
2727
var config = new Config("test");
28-
28+
2929
expect(config.invalidLinkURL).toEqual("myInvalidLink");
3030
expect(config.verifyEmailSuccessURL).toEqual("myVerifyEmailSuccess");
3131
expect(config.choosePasswordURL).toEqual("myChoosePassword");
@@ -78,7 +78,7 @@ describe("Email Verification", () => {
7878
}
7979
});
8080
});
81-
81+
8282
it('does not send verification email when verification is enabled and email is not set', done => {
8383
var emailAdapter = {
8484
sendVerificationEmail: () => Promise.resolve(),
@@ -119,7 +119,7 @@ describe("Email Verification", () => {
119119
}
120120
});
121121
});
122-
122+
123123
it('does send a validation email when updating the email', done => {
124124
var emailAdapter = {
125125
sendVerificationEmail: () => Promise.resolve(),
@@ -169,7 +169,7 @@ describe("Email Verification", () => {
169169
}
170170
});
171171
});
172-
172+
173173
it('does send with a simple adapter', done => {
174174
var calls = 0;
175175
var emailAdapter = {
@@ -311,7 +311,7 @@ describe("Email Verification", () => {
311311
followRedirect: false,
312312
}, (error, response, body) => {
313313
expect(response.statusCode).toEqual(302);
314-
expect(response.body).toEqual('Found. Redirecting to http://localhost:8378/1/apps/verify_email_success.html?username=zxcv');
314+
expect(response.body).toEqual('Found. Redirecting to http://localhost:8378/1/apps/verify_email_success.html?username=user%2Bworld');
315315
user.fetch()
316316
.then(() => {
317317
expect(user.get('emailVerified')).toEqual(true);
@@ -342,7 +342,7 @@ describe("Email Verification", () => {
342342
publicServerURL: "http://localhost:8378/1"
343343
});
344344
user.setPassword("asdf");
345-
user.setUsername("zxcv");
345+
user.setUsername("hello+world");
346346
user.set('email', '[email protected]');
347347
user.signUp();
348348
});
@@ -453,7 +453,7 @@ describe("Email Verification", () => {
453453
});
454454

455455
describe("Password Reset", () => {
456-
456+
457457
it('should send a password reset link', done => {
458458
var user = new Parse.User();
459459
var emailAdapter = {
@@ -503,7 +503,7 @@ describe("Password Reset", () => {
503503
});
504504
});
505505
});
506-
506+
507507
it('redirects you to invalid link if you try to request password for a nonexistant users email', done => {
508508
setServerConfiguration({
509509
serverURL: 'http://localhost:8378/1',
@@ -555,8 +555,8 @@ describe("Password Reset", () => {
555555
return;
556556
}
557557
var token = match[1];
558-
559-
request.post({
558+
559+
request.post({
560560
url: "http://localhost:8378/1/apps/test/request_password_reset" ,
561561
body: `new_password=hello&token=${token}&username=zxcv`,
562562
headers: {
@@ -571,15 +571,15 @@ describe("Password Reset", () => {
571571
}
572572
expect(response.statusCode).toEqual(302);
573573
expect(response.body).toEqual('Found. Redirecting to http://localhost:8378/1/apps/password_reset_success.html');
574-
574+
575575
Parse.User.logIn("zxcv", "hello").then(function(user){
576576
done();
577577
}, (err) => {
578578
console.error(err);
579579
fail("should login with new password");
580580
done();
581581
});
582-
582+
583583
});
584584
});
585585
},
@@ -613,6 +613,5 @@ describe("Password Reset", () => {
613613
});
614614
});
615615
});
616-
617-
})
618616

617+
})

0 commit comments

Comments
 (0)