Created
September 24, 2014 19:52
-
-
Save JackTanRoo/9d506865f80ab8c540aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('Unit: sendFactory - TxBuilder', function () { | |
beforeEach(module('bitclip')); | |
var $scope, $rootScope, $location, $window, $q, $timeout, transactionDetails, createController, TxBuilder, tempStore; | |
beforeEach(inject(function($injector) { | |
$rootScope = $injector.get('$rootScope'); | |
$location = $injector.get('$location'); | |
$scope = $rootScope.$new(); | |
$window = $injector.get('$window'); | |
$timeout = $injector.get('$timeout'); | |
TxBuilder = $injector.get('TxBuilder'); | |
$q = $injector.get('$q'); | |
transactionDetails = { | |
amount:"", | |
destination:"" | |
}; | |
})); | |
//this async test is not working properly | |
it.only('should return success when sending a correctly stated transaction', function (done) { | |
transactionDetails.amount = 0.01; | |
transactionDetails.destination = "mpduks3B8ULftm1hcbEf3jQU7iGae7mEMS"; | |
TxBuilder.sendTransaction(tempStore.testNet.currentPrivateKey, transactionDetails,false) | |
.then(function(message){ | |
expect(message).to.equal("Transaction successfully propagated"); | |
done(); | |
}) | |
.catch(function(error){ | |
done(error); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment