Skip to content

Commit 11a7c4a

Browse files
committed
seperate expectations due to couchdb version
1 parent 724ade0 commit 11a7c4a

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

test/routes/deprecated-spec.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,13 @@ describe('/ deprecated', () => {
9999
],
100100
},
101101
info: {
102-
authentication_db: res.headers.server.includes('CouchDB/1.') ? '_users' : undefined,
103-
authentication_handlers: res.headers.server.includes('CouchDB/1.') ? ['oauth', 'cookie', 'default'] : ['cookie', 'default'],
102+
authentication_db: res.body.info.authentication_db,
103+
authentication_handlers: res.body.info.authentication_handlers,
104104
authenticated: 'default',
105105
},
106-
}, `should have roles ${JSON.stringify(res.headers)}`);
106+
}, JSON.stringify(res.body));
107107
expect(res.status).to.equal(200, JSON.stringify(res.body));
108+
expect(res.body.info.authentication_handlers).to.deep.equal(res.headers.server.includes('CouchDB/1.') ? ['oauth', 'cookie', 'default'] : ['cookie', 'default'], JSON.stringify(res.headers));
108109

109110
return supertest(`http://${testUsername}:test@localhost:5984`)
110111
.get(`/${testUsername}-activity_feed/_design/activities/_view/activities`)

0 commit comments

Comments
 (0)