Permalink
Browse files

Updating tests

  • Loading branch information...
1 parent f021357 commit 7cc4155bcf813baa267afe47ce0e68360b3a63b2 @rgerard committed Jul 16, 2014
Showing with 27 additions and 26 deletions.
  1. +27 −26 test/index.js
View
@@ -165,32 +165,6 @@ describe('coinbase.orders.get', function () {
});
});
});
-describe('coinbase.orders.post', function () {
- it('should generate a new order', function (done) {
- var param = {
- "button": {
- "name": 'test',
- "type": 'buy_now',
- "price_string": '1.23',
- "price_currency_iso": 'USD',
- }
- };
- coinbase.orders.post(param, function (err, data) {
- if (err) return done(err);
- log('data: ' + util.inspect(data, null, 5));
- data.should.have.property('success', true);
- data.should.have.property('order');
- data.order.should.have.property('id');
- data.order.should.have.property('created_at');
- data.order.should.have.property('status');
- data.order.should.have.property('total_btc');
- data.order.should.have.property('total_native');
- data.order.should.have.property('receive_address');
- data.order.should.have.property('button');
- done();
- });
- });
-});
describe('coinbase.prices.buy', function () {
it('should return the total buy price for some bitcoin amount', function (done) {
coinbase.prices.buy(function (err, data) {
@@ -307,4 +281,31 @@ describe.skip('WARNING', function() {
});
});
});
+
+ describe('coinbase.orders.create', function () {
+ it('should generate a new order', function (done) {
+ var param = {
+ "button": {
+ "name": 'test',
+ "type": 'buy_now',
+ "price_string": '1.23',
+ "price_currency_iso": 'USD',
+ }
+ };
+ coinbase.orders.create(param, function (err, data) {
+ if (err) return done(err);
+ log('data: ' + util.inspect(data, null, 5));
+ data.should.have.property('success', true);
+ data.should.have.property('order');
+ data.order.should.have.property('id');
+ data.order.should.have.property('created_at');
+ data.order.should.have.property('status');
+ data.order.should.have.property('total_btc');
+ data.order.should.have.property('total_native');
+ data.order.should.have.property('receive_address');
+ data.order.should.have.property('button');
+ done();
+ });
+ });
+ });
});

0 comments on commit 7cc4155

Please sign in to comment.