From 5a084ea3ccbc466c094a01272e5155630328112c Mon Sep 17 00:00:00 2001 From: Geert Weening Date: Fri, 7 Nov 2014 18:04:36 -0800 Subject: [PATCH] [TEST] fix broken tests as a result of updating account_info request in account.js --- test/account-test.js | 14 ++++++++------ test/message-test.js | 6 ++++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/test/account-test.js b/test/account-test.js index 06f8a5ce..1a7744a1 100644 --- a/test/account-test.js +++ b/test/account-test.js @@ -29,13 +29,15 @@ describe('Account', function(){ }); + // XXX: clean up the stubbed out remote methods + describe('#publicKeyIsActive()', function(){ it('should respond true if the public key corresponds to the account address and the master key IS NOT disabled', function(){ var account = new Account({ on: function(){}, - request_account_info: function(address, callback) { + requestAccountInfo: function(address, callback) { if (address === 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz') { callback(null, { account_data: { Account: 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz', @@ -56,7 +58,7 @@ describe('Account', function(){ var account = new Account({ on: function(){}, - request_account_info: function(address, callback) { + requestAccountInfo: function(address, callback) { if (address === 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz') { callback(null, { account_data: { Account: 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz', @@ -77,7 +79,7 @@ describe('Account', function(){ var account = new Account({ on: function(){}, - request_account_info: function(address, callback) { + requestAccountInfo: function(address, callback) { if (address === 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz') { callback(null, { account_data: { Account: 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz', @@ -99,7 +101,7 @@ describe('Account', function(){ var account = new Account({ on: function(){}, - request_account_info: function(address, callback) { + requestAccountInfo: function(address, callback) { if (address === 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz') { callback(null, { account_data: { Account: 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz', @@ -121,7 +123,7 @@ describe('Account', function(){ var account = new Account({ on: function(){}, - request_account_info: function(address, callback) { + requestAccountInfo: function(address, callback) { if (address === 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz') { callback(null, { account_data: { Account: 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz', @@ -142,7 +144,7 @@ describe('Account', function(){ var account = new Account({ on: function(){}, - request_account_info: function(address, callback) { + requestAccountInfo: function(address, callback) { if (address === 'rLdfp6eoR948KVxfn6EpaaNTKwfwXhzSeQ') { callback({ error: 'remoteError', error_message: 'Remote reported an error.', diff --git a/test/message-test.js b/test/message-test.js index c7c4aa3c..13fbdbec 100644 --- a/test/message-test.js +++ b/test/message-test.js @@ -270,7 +270,8 @@ describe('Message', function(){ //Remote.prototype.addServer = function(){}; var test_remote = new Remote(); test_remote.state = 'online'; - test_remote.request_account_info = function(account, callback) { + test_remote.requestAccountInfo = function(options, callback) { + var account = options.account; if (account === data.account) { callback(null, { "account_data": { @@ -306,7 +307,8 @@ describe('Message', function(){ //Remote.prototype.addServer = function(){}; var test_remote = new Remote(); test_remote.state = 'online'; - test_remote.request_account_info = function(account, callback) { + test_remote.requestAccountInfo = function(options, callback) { + var account = options.account; if (account === data.account) { callback(null, { "account_data": {