Commit e5560c49 authored by Fernando's avatar Fernando

Update actions spec to use async/await

* Update tests
parent a61e5877
export default () => ({ export default () => ({
securityConfigurationPath: '', securityConfigurationPath: '',
initialized: false,
isLoading: false, isLoading: false,
errorLoading: false, errorLoading: false,
configuration: {}, configuration: {},
......
...@@ -17,8 +17,8 @@ describe('security configuration module actions', () => { ...@@ -17,8 +17,8 @@ describe('security configuration module actions', () => {
describe('setSecurityConfigurationEndpoint', () => { describe('setSecurityConfigurationEndpoint', () => {
const securityConfigurationPath = 123; const securityConfigurationPath = 123;
it('should commit the SET_SECURITY_CONFIGURATION_ENDPOINT mutation', () => { it('should commit the SET_SECURITY_CONFIGURATION_ENDPOINT mutation', async () => {
testAction( await testAction(
actions.setSecurityConfigurationEndpoint, actions.setSecurityConfigurationEndpoint,
securityConfigurationPath, securityConfigurationPath,
state, state,
...@@ -51,8 +51,8 @@ describe('security configuration module actions', () => { ...@@ -51,8 +51,8 @@ describe('security configuration module actions', () => {
mock.onGet(state.securityConfigurationPath).replyOnce(200, configuration); mock.onGet(state.securityConfigurationPath).replyOnce(200, configuration);
}); });
it('should commit the request and success mutations', () => { it('should commit the request and success mutations', async () => {
testAction( await testAction(
actions.fetchSecurityConfiguration, actions.fetchSecurityConfiguration,
{}, {},
state, state,
...@@ -73,10 +73,10 @@ describe('security configuration module actions', () => { ...@@ -73,10 +73,10 @@ describe('security configuration module actions', () => {
mock.onGet(state.securityConfigurationPath).replyOnce(200, configuration); mock.onGet(state.securityConfigurationPath).replyOnce(200, configuration);
}); });
it('should commit RECEIVE_SECURITY_CONFIGURATION_ERROR mutation', () => { it('should commit RECEIVE_SECURITY_CONFIGURATION_ERROR mutation', async () => {
state.securityConfigurationPath = ''; state.securityConfigurationPath = '';
testAction( await testAction(
actions.fetchSecurityConfiguration, actions.fetchSecurityConfiguration,
{}, {},
state, state,
...@@ -95,8 +95,8 @@ describe('security configuration module actions', () => { ...@@ -95,8 +95,8 @@ describe('security configuration module actions', () => {
mock.onGet(state.securityConfigurationPath).replyOnce(404); mock.onGet(state.securityConfigurationPath).replyOnce(404);
}); });
it('should commit REQUEST_SECURITY_CONFIGURATION and RECEIVE_SECURITY_CONFIGURATION_ERRORmutation', () => { it('should commit REQUEST_SECURITY_CONFIGURATION and RECEIVE_SECURITY_CONFIGURATION_ERRORmutation', async () => {
testAction( await testAction(
actions.fetchSecurityConfiguration, actions.fetchSecurityConfiguration,
{}, {},
state, state,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment