test: Make sure the status of a compose is called status
This was a bit confusing because in the inline documentation, I wrote that a compose used state as a key. However this changed to status pretty early on and I forgot to update it. Also use an actual uuid with proper length.
This commit is contained in:
parent
a39304a3ba
commit
abb3bbc868
4 changed files with 9 additions and 8 deletions
|
|
@ -49,7 +49,7 @@ rules:
|
||||||
- error
|
- error
|
||||||
- 4
|
- 4
|
||||||
- SwitchCase: 1
|
- SwitchCase: 1
|
||||||
MemberExpression: 0
|
MemberExpression: 1
|
||||||
ImportDeclaration: 1
|
ImportDeclaration: 1
|
||||||
ObjectExpression: 1
|
ObjectExpression: 1
|
||||||
react/jsx-curly-spacing:
|
react/jsx-curly-spacing:
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@ import types from './types';
|
||||||
|
|
||||||
// Example of action.compose
|
// Example of action.compose
|
||||||
// {
|
// {
|
||||||
// "xxxx-xxxx-xxxx-xxxx": {
|
// "77e4c693-0497-4b85-936d-b2a3ad69571b": {
|
||||||
// state: "uploading",
|
// status: "uploading",
|
||||||
// distribution: "fedora-31",
|
// distribution: "fedora-31",
|
||||||
// architecture: "x86_64",
|
// architecture: "x86_64",
|
||||||
// image_type: "qcow2"
|
// image_type: "qcow2"
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@ import actions from '../../../SmartComponents/redux/actions';
|
||||||
import types from '../../../SmartComponents/redux/types';
|
import types from '../../../SmartComponents/redux/types';
|
||||||
|
|
||||||
const compose = {
|
const compose = {
|
||||||
'xxxx-xxxx-xxxx-xxxx': {
|
'77e4c693-0497-4b85-936d-b2a3ad69571b': {
|
||||||
state: 'uploading',
|
status: 'uploading',
|
||||||
distribution: 'fedora-31',
|
distribution: 'fedora-31',
|
||||||
architecture: 'x86_64',
|
architecture: 'x86_64',
|
||||||
image_type: 'qcow2'
|
image_type: 'qcow2'
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@ import { composeReducer } from '../../../SmartComponents/redux/reducers';
|
||||||
import types from '../../../SmartComponents/redux/types';
|
import types from '../../../SmartComponents/redux/types';
|
||||||
|
|
||||||
const compose = {
|
const compose = {
|
||||||
'xxxx-xxxx-xxxx-xxxx': {
|
'77e4c693-0497-4b85-936d-b2a3ad69571b': {
|
||||||
state: 'uploading',
|
status: 'uploading',
|
||||||
distribution: 'fedora-31',
|
distribution: 'fedora-31',
|
||||||
architecture: 'x86_64',
|
architecture: 'x86_64',
|
||||||
image_type: 'qcow2'
|
image_type: 'qcow2'
|
||||||
|
|
@ -29,6 +29,7 @@ describe('composeReducer', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(result.testAttr).toBe('test-me');
|
expect(result.testAttr).toBe('test-me');
|
||||||
expect(result['xxxx-xxxx-xxxx-xxxx']).toEqual(compose['xxxx-xxxx-xxxx-xxxx']);
|
expect(result['77e4c693-0497-4b85-936d-b2a3ad69571b'])
|
||||||
|
.toEqual(compose['77e4c693-0497-4b85-936d-b2a3ad69571b']);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue