-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
21 additions
and
324 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "cspace-client", | ||
"version": "2.0.0-rc.1", | ||
"version": "2.0.0-rc.2", | ||
"description": "CollectionSpace client for browsers and Node.js", | ||
"author": "Ray Lee <[email protected]>", | ||
"license": "ECL-2.0", | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,8 @@ import chai from 'chai'; | |
import chaiAsPromised from 'chai-as-promised'; | ||
import client from '../../src/client'; | ||
|
||
const { expect } = chai; | ||
|
||
chai.use(chaiAsPromised); | ||
chai.should(); | ||
|
||
|
@@ -59,6 +61,11 @@ describe.skip(`crud operations on ${clientConfig.url}`, function suite() { | |
|
||
let objectCsid = ''; | ||
|
||
it('reports null logged in username before logging in', () => { | ||
expect(adminSession.username()).to.equal(null); | ||
expect(readerSession.username()).to.equal(null); | ||
}); | ||
|
||
it('cannot list records as admin before logging in', () => ( | ||
adminSession.read('collectionobjects').should.eventually | ||
.be.rejected | ||
|
@@ -93,6 +100,11 @@ describe.skip(`crud operations on ${clientConfig.url}`, function suite() { | |
}) | ||
)); | ||
|
||
it('reports the logged in username', () => { | ||
adminSession.username().should.equal('[email protected]'); | ||
readerSession.username().should.equal('[email protected]'); | ||
}); | ||
|
||
it('can create an object record as admin', function test() { | ||
if (!adminLoggedIn) { | ||
this.skip(); | ||
|
@@ -333,6 +345,11 @@ describe.skip(`crud operations on ${clientConfig.url}`, function suite() { | |
.and.be.an('object') | ||
)); | ||
|
||
it('reports null logged in username after logging out', () => { | ||
expect(adminSession.username()).to.equal(null); | ||
expect(readerSession.username()).to.equal(null); | ||
}); | ||
|
||
it('can log out multiple times', () => ( | ||
readerSession.logout().should.eventually | ||
.be.fulfilled | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.