Skip to content

Commit 7fa1039

Browse files
committed
restore test account-creation-oidc-test.js
1 parent f66a8ea commit 7fa1039

File tree

1 file changed

+37
-36
lines changed

1 file changed

+37
-36
lines changed

test/integration/account-creation-oidc-test.js

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -224,42 +224,43 @@ describe('AccountManager (OIDC account creation tests)', function () {
224224
})
225225

226226
// FIXME: #1502
227-
// describe('Single User signup page', () => {
228-
// const serverUri = 'https://localhost:7457'
229-
// const port = 7457
230-
// let ldpHttpsServer
231-
// const rootDir = path.join(__dirname, '../resources/accounts/single-user/')
232-
// const configPath = path.join(__dirname, '../resources/config')
233-
// const ldp = ldnode.createServer({
234-
// port,
235-
// root: rootDir,
236-
// configPath,
237-
// sslKey: path.join(__dirname, '../keys/key.pem'),
238-
// sslCert: path.join(__dirname, '../keys/cert.pem'),
239-
// webid: true,
240-
// multiuser: false,
241-
// strictOrigin: true
242-
// })
243-
// const server = supertest(serverUri)
244-
//
245-
// before(function (done) {
246-
// ldpHttpsServer = ldp.listen(port, () => server.post('/api/accounts/new')
247-
// .send('username=foo&password=12345&acceptToc=true')
248-
// .end(done))
249-
// })
250-
//
251-
// after(function () {
252-
// if (ldpHttpsServer) ldpHttpsServer.close()
253-
// fs.removeSync(rootDir)
254-
// })
255-
//
256-
// it('should return a 406 not acceptable without accept text/html', done => {
257-
// server.get('/')
258-
// .set('accept', 'text/plain')
259-
// .expect(406)
260-
// .end(done)
261-
// })
262-
// })
227+
describe('Single User signup page', () => {
228+
const serverUri = 'https://localhost:7457'
229+
const port = 7457
230+
let ldpHttpsServer
231+
rm('resources/accounts/single-user/')
232+
const rootDir = path.join(__dirname, '../resources/accounts/single-user/')
233+
const configPath = path.join(__dirname, '../resources/config')
234+
const ldp = ldnode.createServer({
235+
port,
236+
root: rootDir,
237+
configPath,
238+
sslKey: path.join(__dirname, '../keys/key.pem'),
239+
sslCert: path.join(__dirname, '../keys/cert.pem'),
240+
webid: true,
241+
multiuser: false,
242+
strictOrigin: true
243+
})
244+
const server = supertest(serverUri)
245+
246+
before(function (done) {
247+
ldpHttpsServer = ldp.listen(port, () => server.post('/api/accounts/new')
248+
.send('username=foo&password=12345&acceptToc=true')
249+
.end(done))
250+
})
251+
252+
after(function () {
253+
if (ldpHttpsServer) ldpHttpsServer.close()
254+
fs.removeSync(rootDir)
255+
})
256+
257+
it('should return a 406 not acceptable without accept text/html', done => {
258+
server.get('/')
259+
.set('accept', 'text/plain')
260+
.expect(406)
261+
.end(done)
262+
})
263+
})
263264

264265
// FIXME: #1502
265266
describe('Signup page where Terms & Conditions are not being enforced', () => {

0 commit comments

Comments
 (0)