balena-cli/tests/commands/env/rm.spec.ts
Lucian 730c09989d Fix incorrect arguments passed to oclif bootstrap function
Adds tests for existing oclif commands to avoid regressions

Change-type: patch
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-08-15 18:26:42 +01:00

18 lines
489 B
TypeScript

import * as chai from 'chai';
import { balenaAPIMock, runCommand } from '../../helpers';
describe('balena env rm', function() {
it('should successfully delete an environment variable', async () => {
const mock = balenaAPIMock();
mock.delete(/device_environment_variable/).reply(200, 'OK');
const { out, err } = await runCommand('env rm 144690 -d -y');
chai.expect(out.join('')).to.equal('');
chai.expect(err.join('')).to.equal('');
// @ts-ignore
mock.remove();
});
});