const fs = require('fs');
const buf = fs.readFileSync('test/emails_15_internal.csv');
const createCampaignCommand = {
name: 'TEST_e2e_SEGMENT',
country: 'ES',
location: 'all',
remunerationModels: RemunerationModel.COST_PER_THOUSAND,
sectors: [Sector.FINANCE_INSURANCE],
segmentationType: [segmententionType],
description: 'TEST-e2e',
dateStart: formattedDateStart,
dateEnd: formattedDateEnd,
shippingDays: 'every_days',
maxDailyShipments: 100,
totalShipments: 100,
sender: 'TEST-e2e',
subject: 'TEST-e2e',
content: 'TEST-e2e',
url: 'TEST-e2e.com',
config:
"{fields: { email: 1, zipcode: 0 },header: null,separator: ';',}",
idUser: 9,
payout: 100,
exclude: true,
file: buf,
};
await request(app.getHttpServer())
.post('/campaigns')
.set('accept', '*/*')
.send(createCampaignCommand)
.query({ file: buf })
.expect(201);
id,email,firstname,lastname,birthdate,address,zipcode,city,phone,age,gender
1,e2eTEST@digitup.es,Geoffreysleepy2,msn,4/4/1957,Calle Alcala,28028,Madrid,649238243,17,f
2,emilioTEST23@digitup.es,Geoffreysleepy2,msn,4/4/1957,Calle Alcala,28028,Madrid,649238243,17,f