mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-25 12:16:37 +00:00
See: https://github.com/resin-io/etcher/pull/1351 Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
This commit is contained in:
parent
30c531417a
commit
23a5e53d50
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2017 resin.io
|
* Copyright 2016 resin.io
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -39,7 +39,7 @@ describe('Shared: permissions', function() {
|
|||||||
m.chai.expect(permissions.getEnvironmentCommandPrefix()).to.deep.equal([]);
|
m.chai.expect(permissions.getEnvironmentCommandPrefix()).to.deep.equal([]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return an empty array environment is an empty object', function() {
|
it('should return an empty array if the environment is an empty object', function() {
|
||||||
m.chai.expect(permissions.getEnvironmentCommandPrefix({})).to.deep.equal([]);
|
m.chai.expect(permissions.getEnvironmentCommandPrefix({})).to.deep.equal([]);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -76,11 +76,11 @@ describe('Shared: permissions', function() {
|
|||||||
it('should ignore undefined and null variable values', function() {
|
it('should ignore undefined and null variable values', function() {
|
||||||
m.chai.expect(permissions.getEnvironmentCommandPrefix({
|
m.chai.expect(permissions.getEnvironmentCommandPrefix({
|
||||||
FOO: null,
|
FOO: null,
|
||||||
BAR: undefined,
|
BAR: 'qux',
|
||||||
BAZ: 'qux'
|
BAZ: undefined
|
||||||
})).to.deep.equal([
|
})).to.deep.equal([
|
||||||
'set',
|
'set',
|
||||||
'BAZ=qux',
|
'BAR=qux',
|
||||||
'&&',
|
'&&',
|
||||||
'call'
|
'call'
|
||||||
]);
|
]);
|
||||||
@ -122,7 +122,7 @@ describe('Shared: permissions', function() {
|
|||||||
m.chai.expect(permissions.getEnvironmentCommandPrefix()).to.deep.equal([]);
|
m.chai.expect(permissions.getEnvironmentCommandPrefix()).to.deep.equal([]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return an empty array environment is an empty object', function() {
|
it('should return an empty array if the environment is an empty object', function() {
|
||||||
m.chai.expect(permissions.getEnvironmentCommandPrefix({})).to.deep.equal([]);
|
m.chai.expect(permissions.getEnvironmentCommandPrefix({})).to.deep.equal([]);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -151,11 +151,11 @@ describe('Shared: permissions', function() {
|
|||||||
it('should ignore undefined and null variable values', function() {
|
it('should ignore undefined and null variable values', function() {
|
||||||
m.chai.expect(permissions.getEnvironmentCommandPrefix({
|
m.chai.expect(permissions.getEnvironmentCommandPrefix({
|
||||||
FOO: null,
|
FOO: null,
|
||||||
BAR: undefined,
|
BAR: 'qux',
|
||||||
BAZ: 'qux'
|
BAZ: undefined
|
||||||
})).to.deep.equal([
|
})).to.deep.equal([
|
||||||
'env',
|
'env',
|
||||||
'BAZ=qux'
|
'BAR=qux'
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -189,7 +189,7 @@ describe('Shared: permissions', function() {
|
|||||||
m.chai.expect(permissions.getEnvironmentCommandPrefix()).to.deep.equal([]);
|
m.chai.expect(permissions.getEnvironmentCommandPrefix()).to.deep.equal([]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return an empty array environment is an empty object', function() {
|
it('should return an empty array if the environment is an empty object', function() {
|
||||||
m.chai.expect(permissions.getEnvironmentCommandPrefix({})).to.deep.equal([]);
|
m.chai.expect(permissions.getEnvironmentCommandPrefix({})).to.deep.equal([]);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -218,11 +218,11 @@ describe('Shared: permissions', function() {
|
|||||||
it('should ignore undefined and null variable values', function() {
|
it('should ignore undefined and null variable values', function() {
|
||||||
m.chai.expect(permissions.getEnvironmentCommandPrefix({
|
m.chai.expect(permissions.getEnvironmentCommandPrefix({
|
||||||
FOO: null,
|
FOO: null,
|
||||||
BAR: undefined,
|
BAR: 'qux',
|
||||||
BAZ: 'qux'
|
BAZ: undefined
|
||||||
})).to.deep.equal([
|
})).to.deep.equal([
|
||||||
'env',
|
'env',
|
||||||
'BAZ=qux'
|
'BAR=qux'
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user