2016-05-20 07:50:55 -07:00
|
|
|
describe('Backup Controller', function() {
|
|
|
|
|
|
|
|
var walletService;
|
|
|
|
|
|
|
|
describe('Incomplete wallet', function() {
|
|
|
|
beforeEach(function(done) {
|
|
|
|
mocks.init(FIXTURES, 'backupController', {
|
|
|
|
loadProfile: PROFILE.incomplete2of2,
|
|
|
|
}, done);
|
|
|
|
});
|
|
|
|
|
|
|
|
afterEach(function(done) {
|
|
|
|
mocks.clear({}, done);
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should be defined', function() {
|
|
|
|
should.exist(ctrl);
|
|
|
|
});
|
2016-06-14 08:01:18 -07:00
|
|
|
|
2016-05-20 07:50:55 -07:00
|
|
|
it('should set the mnemonic incomplete wallets', function(done) {
|
2016-06-17 07:10:56 -07:00
|
|
|
scope.initFlow();
|
2016-06-14 08:01:18 -07:00
|
|
|
should.exist(scope.mnemonicWords);
|
|
|
|
scope.mnemonicWords.should.deep.equal('dizzy cycle skirt decrease exotic fork sure mixture hair vapor copper hero'.split(' '));
|
2016-05-20 07:50:55 -07:00
|
|
|
done();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe('Complete 1-1 wallet', function() {
|
|
|
|
beforeEach(function(done) {
|
|
|
|
mocks.init(FIXTURES, 'backupController', {
|
|
|
|
loadProfile: PROFILE.testnet1of1,
|
|
|
|
}, done);
|
|
|
|
});
|
|
|
|
|
|
|
|
afterEach(function(done) {
|
|
|
|
mocks.clear({}, done);
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should not set the mnemonic for complete wallets', function() {
|
2016-06-17 07:10:56 -07:00
|
|
|
scope.initFlow();
|
2016-06-14 08:01:18 -07:00
|
|
|
scope.mnemonicWords.should.deep.equal('cheese where alarm job conduct donkey license pave congress pepper fence current'.split(' '));
|
2016-05-20 07:50:55 -07:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should set main wallet info', function(done) {
|
2016-06-14 08:01:18 -07:00
|
|
|
scope.walletName.should.equal('kk');
|
2016-05-20 07:50:55 -07:00
|
|
|
done();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|