tests: avoid unnecessary .ok

This commit is contained in:
Daniel Cousens 2014-08-20 09:17:55 +10:00
parent 4b52c42c91
commit 82d8e20793
3 changed files with 7 additions and 7 deletions

View file

@ -91,13 +91,13 @@ describe('ECPubKey', function() {
it('verifies a valid signature', function() {
var hash = crypto.sha256(fixtures.message)
assert.ok(pubKey.verify(hash, signature))
assert(pubKey.verify(hash, signature))
})
it('doesn\'t verify the wrong signature', function() {
var hash = crypto.sha256('mushrooms')
assert.ok(!pubKey.verify(hash, signature))
assert(!pubKey.verify(hash, signature))
})
})
})

View file

@ -26,7 +26,7 @@ describe('Message', function() {
var network = networks[f.network]
var address = Address.fromBase58Check(f.address)
assert.ok(Message.verify(address, f.signature, f.message, network))
assert(Message.verify(address, f.signature, f.message, network))
})
fixtures.valid.verify.forEach(function(f) {
@ -34,17 +34,17 @@ describe('Message', function() {
var network = networks[f.network]
var signature = f.signature
assert.ok(Message.verify(f.address, f.signature, f.message, network))
assert(Message.verify(f.address, f.signature, f.message, network))
if (f.compressed) {
assert.ok(Message.verify(f.compressed.address, f.compressed.signature, f.message, network))
assert(Message.verify(f.compressed.address, f.compressed.signature, f.message, network))
}
})
})
fixtures.invalid.verify.forEach(function(f) {
it(f.description, function() {
assert.ok(!Message.verify(f.address, f.signature, f.message))
assert(!Message.verify(f.address, f.signature, f.message))
})
})
})

View file

@ -63,7 +63,7 @@ describe('Wallet', function() {
describe('when seed is not specified', function(){
it('generates a seed', function(){
var wallet = new Wallet()
assert.ok(wallet.getMasterKey())
assert(wallet.getMasterKey())
})
})