Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Remove unnecessary comments
Browse files Browse the repository at this point in the history
  • Loading branch information
reyraa committed May 10, 2017
1 parent ca1fd85 commit de281aa
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/test/services/api/accountApi.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,17 @@ chai.use(sinonChai);

describe('Factory: AccountApi', () => {
let peers;
let $q;
let accountApi;
let peersMock;
let deffered;

beforeEach(angular.mock.module('app'));

beforeEach(inject((_Peers_, _$q_, _AccountApi_) => {
beforeEach(inject((_Peers_, _AccountApi_) => {
peers = _Peers_;
$q = _$q_;
accountApi = _AccountApi_;
}));

beforeEach(() => {
deffered = $q.defer();
peersMock = sinon.mock(peers);
peers.setActive({
name: 'Mainnet',
Expand All @@ -35,22 +31,18 @@ describe('Factory: AccountApi', () => {

describe('transaction.create(recipientId, amount, secret, secondSecret)', () => {
it('returns Peers.sendRequest(\'transactions\', options);', () => {
console.log(deffered);
const options = {
recipientId: '537318935439898807L',
amount: 10,
secret: 'wagon stock borrow episode laundry kitten salute link globe zero feed marble',
secondSecret: null,
};
const spy = sinon.spy(peers, 'sendRequestPromise');
// peers.expects('sendRequestPromise').withArgs('transactions',
// options).returns(deffered.promise);

accountApi.transactions.create(
options.recipientId, options.amount, options.secret, options.secondSecret);

expect(spy).to.have.been.calledWith('transactions', options);
// expect(promise).to.equal(deffered.promise);
});
});

Expand All @@ -64,14 +56,11 @@ describe('Factory: AccountApi', () => {
};

const spy = sinon.spy(peers, 'sendRequestPromise');
// peersMock.expects('sendRequestPromise').withArgs('transactions',
// options).returns(deffered.promise);

accountApi.transactions.get(
options.recipientId, options.limit, options.offset);

expect(spy).to.have.been.calledWith('transactions', options);
// expect(promise).to.equal(deffered.promise);
});
});

Expand All @@ -82,14 +71,10 @@ describe('Factory: AccountApi', () => {
const secondSecret = 'stay undo beyond powder sand laptop grow gloom apology hamster primary arrive';

const spy = sinon.spy(peers, 'sendRequestPromise');
// peersMock.expects('sendRequestPromise')
// .withArgs('signatures', { secondSecret, publicKey, secret })
// .returns(deffered.promise);

accountApi.setSecondSecret(secondSecret, publicKey, secret);

expect(spy).to.have.been.calledWith('signatures', { secondSecret, publicKey, secret });
// expect(promise).to.equal(deffered.promise);
});
});
});
Expand Down

0 comments on commit de281aa

Please sign in to comment.