1
0
mirror of https://github.com/bigchaindb/js-bigchaindb-driver.git synced 2024-12-27 23:27:50 +01:00

remove votes endpoint

This commit is contained in:
Jernej Pregelj 2018-08-28 15:38:36 +02:00
parent 80bf01eb55
commit 2afbd3b398
2 changed files with 1 additions and 28 deletions

View File

@ -32,8 +32,7 @@ export default class Connection {
'transactionsCommit': 'transactions?mode=commit',
'transactionsDetail': 'transactions/%(transactionId)s',
'assets': 'assets',
'metadata': 'metadata',
'votes': 'votes'
'metadata': 'metadata'
}[endpoint]
}
@ -108,17 +107,6 @@ export default class Connection {
})
}
/**
* @param blockId
*/
listVotes(blockId) {
return this._req(this.getApiUrls('votes'), {
query: {
block_id: blockId
}
})
}
/**
* @param transaction
*/

View File

@ -178,21 +178,6 @@ test('Get outputs for a public key and spent=true', t => {
})
test('Get votes for a block id', t => {
const expectedPath = 'path'
const blockId = 'abc'
conn._req = sinon.spy()
conn.getApiUrls = sinon.stub().returns(expectedPath)
conn.listVotes(blockId)
t.truthy(conn._req.calledWith(
expectedPath,
{ query: { block_id: blockId } }
))
})
test('Get asset for text', t => {
const expectedPath = 'path'
const search = 'abc'