Merge pull request #721 from maraoz/feature/autotop-send
send all available balance button
This commit is contained in:
commit
b64449ae09
3 changed files with 17 additions and 4 deletions
|
|
@ -128,10 +128,12 @@ describe("Unit: Controllers", function() {
|
|||
);
|
||||
scope.model = {
|
||||
newaddress: null,
|
||||
newlabel: null
|
||||
newlabel: null,
|
||||
};
|
||||
$compile(element)(scope);
|
||||
$controller('SendController', {$scope: scope});
|
||||
$controller('SendController', {$scope: scope,
|
||||
$modal: {},
|
||||
});
|
||||
scope.$digest();
|
||||
form = scope.form;
|
||||
}));
|
||||
|
|
@ -244,6 +246,7 @@ describe("Unit: Controllers", function() {
|
|||
var sendCtrl;
|
||||
beforeEach(inject(function($controller, $rootScope) {
|
||||
scope = $rootScope.$new();
|
||||
$rootScope.availableBalance = 123456;
|
||||
sendCtrl = $controller('SendController', {
|
||||
$scope: scope,
|
||||
$modal: {},
|
||||
|
|
@ -253,6 +256,10 @@ describe("Unit: Controllers", function() {
|
|||
it('should have a SendController', function() {
|
||||
expect(scope.isMobile).not.to.equal(null);
|
||||
});
|
||||
it('should autotop balance correctly', function() {
|
||||
scope.topAmount();
|
||||
expect(scope.amount).to.equal(123356);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue