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

Commit

Permalink
1.5.2: fix missing params init and add test for getPromotion
Browse files Browse the repository at this point in the history
  • Loading branch information
evq committed Nov 20, 2017
1 parent 4300724 commit 5c784c1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,7 @@ Client.prototype.getPromotion = function (lang, callback) {
const self = this

let path, params, paymentId
params = {}

if (self.options.version === 'v1') return

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bat-client",
"version": "1.5.1",
"version": "1.5.2",
"description": "An example of client code for the BAT.",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -32,7 +32,7 @@
"@ambassify/backoff-strategies": "1.0.0",
"bat-balance": "^1.0.4",
"bat-publisher": "^1.3.0",
"bitgo": "4.12.0",
"bitgo": "^4.15.0",
"brave-crypto": "0.0.1",
"http-request-signature": "0.0.2",
"joi": "^11.1.1",
Expand Down
12 changes: 12 additions & 0 deletions test/integrationTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,15 @@ test('balance', async (t) => {
})
})
})

test('getPromotion', async (t) => {
t.plan(2)
const client = new Ledger(null, options)

client.sync(function () {
client.getPromotion(null, function (err, resp) {
t.false(err)
t.true(resp.hasOwnProperty('promotionId'))
})
})
})

0 comments on commit 5c784c1

Please sign in to comment.