Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e5560c49
Commit
e5560c49
authored
Aug 06, 2020
by
Fernando
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update actions spec to use async/await
* Update tests
parent
a61e5877
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
9 deletions
+8
-9
ee/app/assets/javascripts/security_configuration/modules/configuration/state.js
...pts/security_configuration/modules/configuration/state.js
+0
-1
ee/spec/frontend/security_configuration/modules/configuration/actions_spec.js
...urity_configuration/modules/configuration/actions_spec.js
+8
-8
No files found.
ee/app/assets/javascripts/security_configuration/modules/configuration/state.js
View file @
e5560c49
export
default
()
=>
({
export
default
()
=>
({
securityConfigurationPath
:
''
,
securityConfigurationPath
:
''
,
initialized
:
false
,
isLoading
:
false
,
isLoading
:
false
,
errorLoading
:
false
,
errorLoading
:
false
,
configuration
:
{},
configuration
:
{},
...
...
ee/spec/frontend/security_configuration/modules/configuration/actions_spec.js
View file @
e5560c49
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment