Merge pull request #721 from maraoz/feature/autotop-send

send all available balance button
This commit is contained in:
Ryan X. Charles 2014-06-24 07:34:06 -07:00
commit b64449ae09
3 changed files with 17 additions and 4 deletions

View file

@ -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);
});
});
});