mirror of
https://github.com/bigchaindb/js-bigchaindb-driver.git
synced 2025-02-14 21:10:32 +01:00
Writing test for baserequest
This commit is contained in:
parent
f82cbd6526
commit
b77d296069
@ -9,13 +9,13 @@ const conn = new Connection(API_PATH)
|
|||||||
|
|
||||||
test('payload thrown at incorrect API_PATH', t => {
|
test('payload thrown at incorrect API_PATH', t => {
|
||||||
const path = 'http://localhost:9984/api/wrong/'
|
const path = 'http://localhost:9984/api/wrong/'
|
||||||
const conn = new Connection(path)
|
const connection = new Connection(path)
|
||||||
const target = {
|
const target = {
|
||||||
message: 'HTTP Error: Requested page not reachable',
|
message: 'HTTP Error: Requested page not reachable',
|
||||||
status: '404 NOT FOUND',
|
status: '404 NOT FOUND',
|
||||||
requestURI: 'http://localhost:9984/api/wrong/transactionId'
|
requestURI: 'http://localhost:9984/api/wrong/transactionId'
|
||||||
}
|
}
|
||||||
t.deepEqual(target, conn.getTransaction("transactionId"))
|
t.deepEqual(target, connection.getTransaction('transactionId'))
|
||||||
})
|
})
|
||||||
|
|
||||||
test('generate API URLS', t => {
|
test('generate API URLS', t => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user