-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
fb0fbe7
commit 77e7487
Showing
5 changed files
with
99 additions
and
15 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
process.env.NODE_TLS_REJECT_UNAUTHORIZED=0; | ||
import { Provider } from 'cerebral'; | ||
import oada from '../build/index'; | ||
|
||
import chai from 'chai'; | ||
let expect = chai.expect; | ||
|
||
let token = 'def'; | ||
let url = 'https://vip3.ecn.purdue.edu/bookmarks'; | ||
let contentType = 'application/vnd.oada.yield.1+json'; | ||
|
||
describe('#connection()', function() { | ||
it('should connect when a token is provided', () => { | ||
return oada.connect({token, domain: 'https://vip3.ecn.purdue.edu'}).then((result) => { | ||
expect(result).to.have.key('token') | ||
}) | ||
}) | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
'use strict'; | ||
|
||
var _cerebral = require('cerebral'); | ||
|
||
var _index = require('../build/index'); | ||
|
||
var _index2 = _interopRequireDefault(_index); | ||
|
||
var _chai = require('chai'); | ||
|
||
var _chai2 = _interopRequireDefault(_chai); | ||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
|
||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0; | ||
|
||
var expect = _chai2.default.expect; | ||
|
||
var token = 'def'; | ||
var url = 'https://vip3.ecn.purdue.edu/bookmarks'; | ||
var contentType = 'application/vnd.oada.yield.1+json'; | ||
|
||
describe('#connection()', function () { | ||
it('should connect when a token is provided', function () { | ||
return _index2.default.connect({ token: token, domain: 'https://vip3.ecn.purdue.edu' }).then(function (result) { | ||
expect(result).to.have.key('token'); | ||
}); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
process.env.NODE_TLS_REJECT_UNAUTHORIZED=0; | ||
import { Provider } from 'cerebral'; | ||
import oada from '@oada/cerebral-module'; | ||
|
||
import chai from 'chai'; | ||
let expect = chai.expect; | ||
|
||
let token = 'def'; | ||
let url = 'https://vip3.ecn.purdue.edu/bookmarks'; | ||
let contentType = 'application/vnd.oada.yield.1+json'; | ||
|
||
describe('#connection()', function() { | ||
it('should connect when a token is provided', () => { | ||
return oada.connect({token, domain: 'https://vip3.ecn.purdue.edu'}).then((result) => { | ||
expect(result).to.have.key('token') | ||
}) | ||
}) | ||
}); |