fix test
This commit is contained in:
parent
9163127dca
commit
bab8b4c3ff
4 changed files with 16 additions and 11 deletions
|
|
@ -16,9 +16,10 @@ describe('Backup Controller', function() {
|
|||
it('should be defined', function() {
|
||||
should.exist(ctrl);
|
||||
});
|
||||
|
||||
it('should set the mnemonic incomplete wallets', function(done) {
|
||||
should.exist(ctrl);
|
||||
ctrl.mnemonicWords.should.deep.equal('dizzy cycle skirt decrease exotic fork sure mixture hair vapor copper hero'.split(' '));
|
||||
should.exist(scope.mnemonicWords);
|
||||
scope.mnemonicWords.should.deep.equal('dizzy cycle skirt decrease exotic fork sure mixture hair vapor copper hero'.split(' '));
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
|
@ -35,11 +36,11 @@ describe('Backup Controller', function() {
|
|||
});
|
||||
|
||||
it('should not set the mnemonic for complete wallets', function() {
|
||||
ctrl.mnemonicWords.should.deep.equal('cheese where alarm job conduct donkey license pave congress pepper fence current'.split(' '));
|
||||
scope.mnemonicWords.should.deep.equal('cheese where alarm job conduct donkey license pave congress pepper fence current'.split(' '));
|
||||
});
|
||||
|
||||
it('should set main wallet info', function(done) {
|
||||
ctrl.walletName.should.equal('kk');
|
||||
scope.walletName.should.equal('kk');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -18,11 +18,17 @@ describe('Preferences History Controller', function() {
|
|||
mocks.clear({}, done);
|
||||
});
|
||||
|
||||
it('should be defined', function() {
|
||||
should.exist(ctrl);
|
||||
});
|
||||
|
||||
it('should export csv', function(done) {
|
||||
ctrl.csvHistory(function(err) {
|
||||
scope.csvHistory(function(err) {
|
||||
should.not.exist(err);
|
||||
ctrl.csvReady.should.equal(true);
|
||||
JSON.stringify(ctrl.csvContent).should.equal('[{"Date":"2016-06-03T15:54:51.000Z","Destination":"","Description":"","Amount":"0.00120000","Currency":"BTC","Txid":"bf31ecaa8e10ce57f9a889fc4c893b40ff57b016dd763957d942e21ed55fc62c","Creator":"","Copayers":"","Comment":"just a comment"}]');
|
||||
should.exist(scope.csvReady);
|
||||
scope.csvReady.should.equal(true);
|
||||
should.exist(scope.csvContent);
|
||||
JSON.stringify(scope.csvContent).should.equal('[{"Date":"2016-06-03T15:54:51.000Z","Destination":"","Description":"","Amount":"0.00120000","Currency":"BTC","Txid":"bf31ecaa8e10ce57f9a889fc4c893b40ff57b016dd763957d942e21ed55fc62c","Creator":"","Copayers":"","Comment":"just a comment"}]');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue