mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-21 04:35:49 +00:00
[TEST] fix broken tests
as a result of updating account_info request in account.js
This commit is contained in:
@@ -29,13 +29,15 @@ describe('Account', function(){
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// XXX: clean up the stubbed out remote methods
|
||||||
|
|
||||||
describe('#publicKeyIsActive()', function(){
|
describe('#publicKeyIsActive()', function(){
|
||||||
|
|
||||||
it('should respond true if the public key corresponds to the account address and the master key IS NOT disabled', 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({
|
var account = new Account({
|
||||||
on: function(){},
|
on: function(){},
|
||||||
request_account_info: function(address, callback) {
|
requestAccountInfo: function(address, callback) {
|
||||||
if (address === 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz') {
|
if (address === 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz') {
|
||||||
callback(null, { account_data: {
|
callback(null, { account_data: {
|
||||||
Account: 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz',
|
Account: 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz',
|
||||||
@@ -56,7 +58,7 @@ describe('Account', function(){
|
|||||||
|
|
||||||
var account = new Account({
|
var account = new Account({
|
||||||
on: function(){},
|
on: function(){},
|
||||||
request_account_info: function(address, callback) {
|
requestAccountInfo: function(address, callback) {
|
||||||
if (address === 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz') {
|
if (address === 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz') {
|
||||||
callback(null, { account_data: {
|
callback(null, { account_data: {
|
||||||
Account: 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz',
|
Account: 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz',
|
||||||
@@ -77,7 +79,7 @@ describe('Account', function(){
|
|||||||
|
|
||||||
var account = new Account({
|
var account = new Account({
|
||||||
on: function(){},
|
on: function(){},
|
||||||
request_account_info: function(address, callback) {
|
requestAccountInfo: function(address, callback) {
|
||||||
if (address === 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz') {
|
if (address === 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz') {
|
||||||
callback(null, { account_data: {
|
callback(null, { account_data: {
|
||||||
Account: 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz',
|
Account: 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz',
|
||||||
@@ -99,7 +101,7 @@ describe('Account', function(){
|
|||||||
|
|
||||||
var account = new Account({
|
var account = new Account({
|
||||||
on: function(){},
|
on: function(){},
|
||||||
request_account_info: function(address, callback) {
|
requestAccountInfo: function(address, callback) {
|
||||||
if (address === 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz') {
|
if (address === 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz') {
|
||||||
callback(null, { account_data: {
|
callback(null, { account_data: {
|
||||||
Account: 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz',
|
Account: 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz',
|
||||||
@@ -121,7 +123,7 @@ describe('Account', function(){
|
|||||||
|
|
||||||
var account = new Account({
|
var account = new Account({
|
||||||
on: function(){},
|
on: function(){},
|
||||||
request_account_info: function(address, callback) {
|
requestAccountInfo: function(address, callback) {
|
||||||
if (address === 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz') {
|
if (address === 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz') {
|
||||||
callback(null, { account_data: {
|
callback(null, { account_data: {
|
||||||
Account: 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz',
|
Account: 'rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz',
|
||||||
@@ -142,7 +144,7 @@ describe('Account', function(){
|
|||||||
|
|
||||||
var account = new Account({
|
var account = new Account({
|
||||||
on: function(){},
|
on: function(){},
|
||||||
request_account_info: function(address, callback) {
|
requestAccountInfo: function(address, callback) {
|
||||||
if (address === 'rLdfp6eoR948KVxfn6EpaaNTKwfwXhzSeQ') {
|
if (address === 'rLdfp6eoR948KVxfn6EpaaNTKwfwXhzSeQ') {
|
||||||
callback({ error: 'remoteError',
|
callback({ error: 'remoteError',
|
||||||
error_message: 'Remote reported an error.',
|
error_message: 'Remote reported an error.',
|
||||||
|
|||||||
@@ -270,7 +270,8 @@ describe('Message', function(){
|
|||||||
//Remote.prototype.addServer = function(){};
|
//Remote.prototype.addServer = function(){};
|
||||||
var test_remote = new Remote();
|
var test_remote = new Remote();
|
||||||
test_remote.state = 'online';
|
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) {
|
if (account === data.account) {
|
||||||
callback(null, {
|
callback(null, {
|
||||||
"account_data": {
|
"account_data": {
|
||||||
@@ -306,7 +307,8 @@ describe('Message', function(){
|
|||||||
//Remote.prototype.addServer = function(){};
|
//Remote.prototype.addServer = function(){};
|
||||||
var test_remote = new Remote();
|
var test_remote = new Remote();
|
||||||
test_remote.state = 'online';
|
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) {
|
if (account === data.account) {
|
||||||
callback(null, {
|
callback(null, {
|
||||||
"account_data": {
|
"account_data": {
|
||||||
|
|||||||
Reference in New Issue
Block a user