Skip to content

Commit b27d903

Browse files
author
nicola
committed
updating tests
1 parent dd5b5cc commit b27d903

1 file changed

Lines changed: 10 additions & 19 deletions

File tree

‎test/identity-provider.js‎

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ describe('Identity Provider', function () {
5858
.expect(302, done)
5959
})
6060

61-
describe.skip('accessing accounts', function() {
62-
it('should be able to access public file of an account', function(done) {
61+
describe('accessing accounts', function () {
62+
it('should be able to access public file of an account', function (done) {
6363
var subdomain = supertest('https://tim.' + host)
6464
subdomain.get('/hello.html')
6565
.expect(200, done)
@@ -68,42 +68,33 @@ describe('Identity Provider', function () {
6868

6969
describe('creating an account with POST', function () {
7070
it('should return 406 if username is not given', function (done) {
71-
server.post('/accounts')
71+
var subdomain = supertest('https://nicola.' + host)
72+
subdomain.post('/accounts/new')
7273
.expect(406, done)
7374
})
7475
it('should return create WebID if only username is given', function (done) {
7576
rm('accounts/nicola.localhost')
76-
server.post('/accounts')
77+
var subdomain = supertest('https://nicola.' + host)
78+
subdomain.post('/accounts/new')
7779
.send('username=nicola')
7880
.expect(200)
7981
.end(function (err) {
8082
rm('accounts/nicola.localhost')
8183
done(err)
8284
})
8385
})
84-
it.skip('should return text/html with a frame and a certificate if spkac is passed', function (done) {
85-
// var spkac = null // TODO this should be a spkac
86-
rm('accounts/nicola.localhost')
87-
server.post('/accounts')
88-
.send('username=nicola')
89-
.expect(200)
90-
.expect('Content-Type', 'text/html')
91-
.end(function (err) {
92-
done(new Error('Test not implemented yet'))
93-
rm('accounts/nicola.localhost')
94-
done(err)
95-
})
96-
})
86+
9787
it('should not create a WebID if it already exists', function (done) {
9888
rm('accounts/nicola.localhost')
99-
server.post('/accounts')
89+
var subdomain = supertest('https://nicola.' + host)
90+
subdomain.post('/accounts/new')
10091
.send('username=nicola')
10192
.expect(200)
10293
.end(function (err) {
10394
if (err) {
10495
return done(err)
10596
}
106-
server.post('/accounts')
97+
subdomain.post('/accounts/new')
10798
.send('username=nicola')
10899
.expect(406)
109100
.end(function (err) {

0 commit comments

Comments
 (0)