|
|
@@ -209,7 +209,7 @@ const expectInvitePage = (user, link, callback) => {
|
|
|
tryFollowInviteLink(user, link, (err, response, body) => {
|
|
|
expect(err).not.to.exist
|
|
|
expect(response.statusCode).to.equal(200)
|
|
|
- expect(body).to.match(new RegExp('<title>Project Invite - .*</title>'))
|
|
|
+ expect(body).to.match(/<title>Project Invite - .*<\/title>/)
|
|
|
callback()
|
|
|
})
|
|
|
}
|
|
|
@@ -219,7 +219,7 @@ const expectInvalidInvitePage = (user, link, callback) => {
|
|
|
tryFollowInviteLink(user, link, (err, response, body) => {
|
|
|
expect(err).not.to.exist
|
|
|
expect(response.statusCode).to.equal(200)
|
|
|
- expect(body).to.match(new RegExp('<title>Invalid Invite - .*</title>'))
|
|
|
+ expect(body).to.match(/<title>Invalid Invite - .*<\/title>/)
|
|
|
callback()
|
|
|
})
|
|
|
}
|
|
|
@@ -229,7 +229,7 @@ const expectInviteRedirectToRegister = (user, link, callback) => {
|
|
|
tryFollowInviteLink(user, link, (err, response) => {
|
|
|
expect(err).not.to.exist
|
|
|
expect(response.statusCode).to.equal(302)
|
|
|
- expect(response.headers.location).to.match(new RegExp('^/register.*$'))
|
|
|
+ expect(response.headers.location).to.match(/^\/register.*$/)
|
|
|
callback()
|
|
|
})
|
|
|
}
|
|
|
@@ -238,7 +238,7 @@ const expectLoginPage = (user, callback) => {
|
|
|
tryFollowLoginLink(user, '/login', (err, response, body) => {
|
|
|
expect(err).not.to.exist
|
|
|
expect(response.statusCode).to.equal(200)
|
|
|
- expect(body).to.match(new RegExp('<title>Login - .*</title>'))
|
|
|
+ expect(body).to.match(/<title>Login - .*<\/title>/)
|
|
|
callback()
|
|
|
})
|
|
|
}
|