This repository has been archived by the owner on Jul 30, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
556 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,9 @@ env: | |
- secure: "P0ksGaQg9x2OA2+Ue7M8DRMNBS1RrMK4pi5vV4HeGlTDNoZvWhMbmb5RwtykXBR12H8BTzrnsxA5BfMzzVh+F/88eoSL5WJV7n/Ea39xxiATA2edBjbpCFSsAHI8JQWTT0uo2dD5XeLWAx2ZTELRX2PVr6dn7yeJ2PlF39HXXqzi7QeZ+FlHX5dHckrx+9MX9/+qBKzLZegeQHUDgYs7SxFDJ+IshYVY6SMF+fvy7JIVIcQhAZzlyYADaraHmluGuFuNVmfRDOVaDSJX+WQoGfo7UrQawY4hDZRZzXcIBXJSczJJ+JPBXuDDUKznvVifsHR96dxQrOUdyRF3zjRSW3CxFm58loTecsekV1s0f88K0tYfjjreUh5qoPWI2bue5Mqk8AC7hkkWRvOQX9XRrlfzqz5wEWTYIzU44Nv4NzkuBjtgQUMnA7WuMiwjngjGLwHVJfw7TuliYca089xtX6ZocUUXwB834vh2sLIIn/dPLYovOEsWkgav8uzHpizSZwap/gpchbUnIrUeahFjyfr1g5xbzyqkodCe5UhSGjI7OcPbS4WH8/pE7z4Vuz2ZMYcKsdCfyeorzaZ24ERGXQEVA+gA9rWtUM9gyPqdkq2btq75Xxy2lP7HsyA6D637q9Qmn86jgNItVSaFjTaS9AobzaDC8bMDvDV7N6rHLuQ=" | ||
- GIT_DEPLOY_REPO=https://[email protected]/PierrickP/number26.git | ||
|
||
before_install: | ||
- export TZ=Europe/Berlin | ||
|
||
deploy: | ||
- provider: script | ||
script: npm run deployDocs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
'use strict'; | ||
/* eslint-disable global-require, max-len, arrow-body-style */ | ||
const nock = require('nock'); | ||
const chai = require('chai'); | ||
const dirtyChai = require('dirty-chai'); | ||
const expect = chai.expect; | ||
|
||
chai.use(dirtyChai); | ||
|
||
let n26; | ||
const data = require('../fixtures/data'); | ||
|
||
beforeEach((done) => { | ||
require('../fixtures/auth')((err, m) => { | ||
n26 = m; | ||
|
||
done(); | ||
}); | ||
}); | ||
|
||
describe('categories', () => { | ||
const categoriesData = [{ | ||
id: 'macro-bbu', | ||
base64Image: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', | ||
name: 'CASH26 Deposit' | ||
}, { | ||
id: 'micro-insurance', | ||
base64Image: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', | ||
name: 'Insurance' | ||
}, { | ||
id: 'micro-leisure', | ||
base64Image: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', | ||
name: 'Leisure' | ||
}, { | ||
id: 'micro-transport', | ||
base64Image: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', | ||
name: 'Transport' | ||
}, { | ||
id: 'micro-education', | ||
base64Image: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', | ||
name: 'Education' | ||
}, { | ||
id: 'micro-atm', | ||
base64Image: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', | ||
name: 'ATM' | ||
}, { | ||
id: 'micro-miscellaneous', | ||
base64Image: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', | ||
name: 'Miscellaneous' | ||
}, { | ||
id: 'micro-healthcare-drugstores', | ||
base64Image: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', | ||
name: 'Healthcare & Drug Stores' | ||
}, { | ||
id: 'macro-bub', | ||
base64Image: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', | ||
name: 'CASH26 Withdraw' | ||
}, { | ||
id: 'micro-finance', | ||
base64Image: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', | ||
name: 'Finance' | ||
}, { | ||
id: 'micro-housing-energy', | ||
base64Image: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', | ||
name: 'Housing & Energy' | ||
}, { | ||
id: 'micro-groceries', | ||
base64Image: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', | ||
name: 'Groceries' | ||
}, { | ||
id: 'macro-ct', | ||
base64Image: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', | ||
name: 'Income' | ||
}, { | ||
id: 'micro-shopping', | ||
base64Image: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', | ||
name: 'Shopping' | ||
}, { | ||
id: 'macro-dd', | ||
base64Image: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', | ||
name: 'Direct debits' | ||
}, { | ||
id: 'macro-tub', | ||
base64Image: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', | ||
name: 'Foreign Currency Transfer' | ||
}, { | ||
id: 'macro-wu', | ||
base64Image: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', | ||
name: 'N26 Referrals' | ||
}, { | ||
id: 'micro-salary', | ||
base64Image: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', | ||
name: 'Salary' | ||
}, { | ||
id: 'micro-car', | ||
base64Image: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', | ||
name: 'Car' | ||
}, { | ||
id: 'micro-business', | ||
base64Image: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', | ||
name: 'Business expenses' | ||
}, { | ||
id: 'micro-bars-restaurants', | ||
base64Image: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', | ||
name: 'Bars & Restaurants' | ||
}, { | ||
id: 'micro-multimedia', | ||
base64Image: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', | ||
name: 'Multimedia & Telecom' | ||
}, { | ||
id: 'macro-dr', | ||
base64Image: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', | ||
name: 'Direct debit reversals' | ||
}, { | ||
id: 'macro-ft', | ||
base64Image: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', | ||
name: 'MoneyBeam' | ||
}, { | ||
id: 'macro-tbu', | ||
base64Image: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', | ||
name: 'Foreign currency refund' | ||
}, { | ||
id: 'macro-dt', | ||
base64Image: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', | ||
name: 'Outgoing transfers' | ||
}, { | ||
id: 'micro-children', | ||
base64Image: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', | ||
name: 'Children' | ||
}, { | ||
id: 'micro-tax-fines', | ||
base64Image: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', | ||
name: 'Tax & Fines' | ||
}]; | ||
|
||
it('should return categories', () => { | ||
const api = nock('https://api.tech26.de') | ||
.defaultReplyHeaders({ | ||
'Content-Type': 'application/json' | ||
}) | ||
.matchHeader('Authorization', `Bearer ${data.account.access_token}`) | ||
.get('/api/smrt/categories') | ||
.reply(200, categoriesData); | ||
|
||
return n26.categories().then((categories) => { | ||
expect(categories).to.be.eql(categoriesData); | ||
expect(api.isDone()).to.be.true(); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.