'use strict';

const rpcEmulatorModel = require('../orwtpo-getimgd').rpcEmulatorModel;
const unitTestUtils = require('./unitTestUtils');

describe('ORWTPO GETIMGD asynchronous specs', () => {
    let rpc;
    let context;

    beforeAll(() => {
        const res = unitTestUtils.beforeAllScript(rpcEmulatorModel);
        context = res.context;
        rpc = res;
    });

    it('no param should return semicolon-delimited string', (done) => {
        rpc.run([], context, (err, res) => {
            if (err) return unitTestUtils.handleError(err, done);
            expect(res).toBeDefined();
            expect(res.split(';').length === 5).toEqual(true);
            done();
        });
    });
});
