21 lines
596 B
JavaScript
21 lines
596 B
JavaScript
|
|
fdescribe('bitcoinUriService', function() {
|
||
|
|
var bitcoinUriService;
|
||
|
|
|
||
|
|
beforeEach(function() {
|
||
|
|
module('bitcoincom.services');
|
||
|
|
|
||
|
|
inject(function($injector){
|
||
|
|
bitcoinUriService = $injector.get('bitcoinUriService');
|
||
|
|
});
|
||
|
|
});
|
||
|
|
|
||
|
|
it('legacy address', function() {
|
||
|
|
|
||
|
|
var parsed = bitcoinUriService.parse('1JXeGEu7bNEAYu6URT6dU6g1Ys6ffSAWYW');
|
||
|
|
|
||
|
|
expect(parsed.isValid).toBe(true);
|
||
|
|
expect(parsed.address).toBe('1JXeGEu7bNEAYu6URT6dU6g1Ys6ffSAWYW');
|
||
|
|
expect(parsed.coin).toBeUndefined();
|
||
|
|
expect(parsed.legacyAddress).toBe('1JXeGEu7bNEAYu6URT6dU6g1Ys6ffSAWYW');
|
||
|
|
});
|
||
|
|
});
|