Fix variables and toFixed
This commit is contained in:
parent
6586a4b696
commit
17057cb199
2 changed files with 11 additions and 3 deletions
|
|
@ -402,14 +402,19 @@ describe("Unit: Controllers", function() {
|
|||
|
||||
it('receive from uri using BTC', inject(function($rootScope) {
|
||||
var old = $rootScope.wallet.settings.unitToSatoshi;
|
||||
var old_decimals = $rootScope.wallet.settings.unitDecimals;
|
||||
$rootScope.wallet.settings.unitToSatoshi = 100000000;
|
||||
$rootScope.wallet.settings.unitDecimals = 8;
|
||||
sendForm.address.$setViewValue('bitcoin:mxf5psDyA8EQVzb2MZ7MkDWiXuAuWWCRMB?amount=1.018085');
|
||||
expect(sendForm.amount.$modelValue).to.equal(1.018085);
|
||||
sendForm.address.$setViewValue('bitcoin:mxf5psDyA8EQVzb2MZ7MkDWiXuAuWWCRMB?amount=1.01808500');
|
||||
expect(sendForm.amount.$modelValue).to.equal(1.018085);
|
||||
sendForm.address.$setViewValue('bitcoin:mxf5psDyA8EQVzb2MZ7MkDWiXuAuWWCRMB?amount=0.29133585');
|
||||
expect(sendForm.amount.$modelValue).to.equal(0.29133585);
|
||||
sendForm.address.$setViewValue('bitcoin:mxf5psDyA8EQVzb2MZ7MkDWiXuAuWWCRMB?amount=0.1');
|
||||
expect(sendForm.amount.$modelValue).to.equal(0.1);
|
||||
$rootScope.wallet.settings.unitToSatoshi = old;
|
||||
$rootScope.wallet.settings.unitDecimals = old_decimals;
|
||||
}));
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue