Skip to content

Commit

Permalink
merge mess up
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuuleh committed Dec 14, 2017
2 parents c88ccbb + 6fe9234 commit b657042
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
1 change: 1 addition & 0 deletions lib/clients/braintree/braintree.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export const client = braintree.connect({
});

export function cancelSubscription(id: string) {
console.log('IN CANCEL SUBSCRIPTION');
return client.subscription.cancel(id).then(resp => {
return resp.success ? Promise.resolve(resp) : Promise.reject(resp);
});
Expand Down
11 changes: 0 additions & 11 deletions payments-service/subscriptions.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
// @flow weak
// Mock our local braintree client in lib/clients/braintree
jest.mock('../lib/clients/braintree/braintree', () => ({
client: { subscription: { cancel: jest.fn(() => ({ success: true })) } },
}));

import {
cancelSubscription,
Expand Down Expand Up @@ -60,10 +56,3 @@ describe('handler', () => {
});
});
});

describe('cancelSubscription', function() {
test.skip('handles braintree subscriptions', () => {
cancelSubscription('1234', 'braintree');
expect(client.subscription.cancel).toHaveBeenCalledWith('1234');
});
});

0 comments on commit b657042

Please sign in to comment.