diff --git a/ghost/members-importer/test/importer.test.js b/ghost/members-importer/test/importer.test.js index 56ea8b7a41..919878be59 100644 --- a/ghost/members-importer/test/importer.test.js +++ b/ghost/members-importer/test/importer.test.js @@ -2,6 +2,7 @@ // const testUtils = require('./utils'); require('./utils'); +const assert = require('assert'); const fs = require('fs-extra'); const path = require('path'); const sinon = require('sinon'); @@ -167,4 +168,16 @@ describe('Importer', function () { fileContents.should.match(/^email,labels\r\n/); }); }); + + describe('perform', function () { + it('performs import on a single csv file', async function () { + const importer = buildMockImporterInstance(); + + const result = await importer.perform(`${csvPath}/single-column-with-header.csv`); + + assert.equal(result.total, 2); + assert.equal(result.imported, 2); + assert.equal(result.errors.length, 0); + }); + }); });