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
10e20f3a
Commit
10e20f3a
authored
Feb 26, 2020
by
Mark Florian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use toBe matcher for primitives
parent
77648998
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
ee/spec/javascripts/security_dashboard/store/vulnerabilities/mutations_spec.js
...ecurity_dashboard/store/vulnerabilities/mutations_spec.js
+19
-19
No files found.
ee/spec/javascripts/security_dashboard/store/vulnerabilities/mutations_spec.js
View file @
10e20f3a
...
...
@@ -37,7 +37,7 @@ describe('vulnerabilities module mutations', () => {
mutations
[
types
.
SET_VULNERABILITIES_ENDPOINT
](
state
,
endpoint
);
expect
(
state
.
vulnerabilitiesEndpoint
).
to
Equal
(
endpoint
);
expect
(
state
.
vulnerabilitiesEndpoint
).
to
Be
(
endpoint
);
});
});
...
...
@@ -46,7 +46,7 @@ describe('vulnerabilities module mutations', () => {
it
(
`should set pageInfo.page to
${
page
}
`
,
()
=>
{
mutations
[
types
.
SET_VULNERABILITIES_PAGE
](
state
,
page
);
expect
(
state
.
pageInfo
.
page
).
to
Equal
(
page
);
expect
(
state
.
pageInfo
.
page
).
to
Be
(
page
);
});
});
...
...
@@ -116,7 +116,7 @@ describe('vulnerabilities module mutations', () => {
mutations
[
types
.
SET_VULNERABILITIES_COUNT_ENDPOINT
](
state
,
endpoint
);
expect
(
state
.
vulnerabilitiesCountEndpoint
).
to
Equal
(
endpoint
);
expect
(
state
.
vulnerabilitiesCountEndpoint
).
to
Be
(
endpoint
);
});
});
...
...
@@ -166,7 +166,7 @@ describe('vulnerabilities module mutations', () => {
mutations
[
types
.
SET_VULNERABILITIES_HISTORY_ENDPOINT
](
state
,
endpoint
);
expect
(
state
.
vulnerabilitiesHistoryEndpoint
).
to
Equal
(
endpoint
);
expect
(
state
.
vulnerabilitiesHistoryEndpoint
).
to
Be
(
endpoint
);
});
});
...
...
@@ -214,19 +214,19 @@ describe('vulnerabilities module mutations', () => {
it
(
'
should set the vulnerabilitiesHistoryDayRange to number of days
'
,
()
=>
{
mutations
[
types
.
SET_VULNERABILITIES_HISTORY_DAY_RANGE
](
state
,
DAYS
.
THIRTY
);
expect
(
state
.
vulnerabilitiesHistoryDayRange
).
to
Equal
(
DAYS
.
THIRTY
);
expect
(
state
.
vulnerabilitiesHistoryDayRange
).
to
Be
(
DAYS
.
THIRTY
);
});
it
(
'
should set the vulnerabilitiesHistoryMaxDayInterval to 7 if days are 60 and under
'
,
()
=>
{
mutations
[
types
.
SET_VULNERABILITIES_HISTORY_DAY_RANGE
](
state
,
DAYS
.
THIRTY
);
expect
(
state
.
vulnerabilitiesHistoryMaxDayInterval
).
to
Equal
(
7
);
expect
(
state
.
vulnerabilitiesHistoryMaxDayInterval
).
to
Be
(
7
);
});
it
(
'
should set the vulnerabilitiesHistoryMaxDayInterval to 14 if over 60
'
,
()
=>
{
mutations
[
types
.
SET_VULNERABILITIES_HISTORY_DAY_RANGE
](
state
,
DAYS
.
NINETY
);
expect
(
state
.
vulnerabilitiesHistoryMaxDayInterval
).
to
Equal
(
14
);
expect
(
state
.
vulnerabilitiesHistoryMaxDayInterval
).
to
Be
(
14
);
});
});
...
...
@@ -241,12 +241,12 @@ describe('vulnerabilities module mutations', () => {
});
it
(
'
should set the modal title
'
,
()
=>
{
expect
(
state
.
modal
.
title
).
to
Equal
(
vulnerability
.
name
);
expect
(
state
.
modal
.
title
).
to
Be
(
vulnerability
.
name
);
});
it
(
'
should set the modal project
'
,
()
=>
{
expect
(
state
.
modal
.
project
.
value
).
to
Equal
(
vulnerability
.
project
.
full_name
);
expect
(
state
.
modal
.
project
.
url
).
to
Equal
(
vulnerability
.
project
.
full_path
);
expect
(
state
.
modal
.
project
.
value
).
to
Be
(
vulnerability
.
project
.
full_name
);
expect
(
state
.
modal
.
project
.
url
).
to
Be
(
vulnerability
.
project
.
full_path
);
});
it
(
'
should set the modal vulnerability
'
,
()
=>
{
...
...
@@ -262,7 +262,7 @@ describe('vulnerabilities module mutations', () => {
};
mutations
[
types
.
SET_MODAL_DATA
](
state
,
payload
);
expect
(
state
.
modal
.
vulnerability
.
isDismissed
).
to
Equal
(
true
);
expect
(
state
.
modal
.
vulnerability
.
isDismissed
).
to
Be
(
true
);
});
it
(
'
should set hasIssue when the vulnerabilitiy has a related issue
'
,
()
=>
{
...
...
@@ -276,7 +276,7 @@ describe('vulnerabilities module mutations', () => {
};
mutations
[
types
.
SET_MODAL_DATA
](
state
,
payload
);
expect
(
state
.
modal
.
vulnerability
.
hasIssue
).
to
Equal
(
true
);
expect
(
state
.
modal
.
vulnerability
.
hasIssue
).
to
Be
(
true
);
});
it
(
'
should not set hasIssue when the issue_iid in null
'
,
()
=>
{
...
...
@@ -290,7 +290,7 @@ describe('vulnerabilities module mutations', () => {
};
mutations
[
types
.
SET_MODAL_DATA
](
state
,
payload
);
expect
(
state
.
modal
.
vulnerability
.
hasIssue
).
to
Equal
(
false
);
expect
(
state
.
modal
.
vulnerability
.
hasIssue
).
to
Be
(
false
);
});
});
});
...
...
@@ -337,7 +337,7 @@ describe('vulnerabilities module mutations', () => {
});
it
(
'
should set the error state on the modal
'
,
()
=>
{
expect
(
state
.
modal
.
error
).
to
Equal
(
'
There was an error creating the issue
'
);
expect
(
state
.
modal
.
error
).
to
Be
(
'
There was an error creating the issue
'
);
});
});
...
...
@@ -383,7 +383,7 @@ describe('vulnerabilities module mutations', () => {
});
it
(
'
should set the error state on the modal
'
,
()
=>
{
expect
(
state
.
modal
.
error
).
to
Equal
(
'
There was an error creating the merge request
'
);
expect
(
state
.
modal
.
error
).
to
Be
(
'
There was an error creating the merge request
'
);
});
});
...
...
@@ -449,7 +449,7 @@ describe('vulnerabilities module mutations', () => {
});
it
(
'
should set the error state on the modal
'
,
()
=>
{
expect
(
state
.
modal
.
error
).
to
Equal
(
'
There was an error dismissing the vulnerability.
'
);
expect
(
state
.
modal
.
error
).
to
Be
(
'
There was an error dismissing the vulnerability.
'
);
});
});
...
...
@@ -515,7 +515,7 @@ describe('vulnerabilities module mutations', () => {
});
it
(
'
should set the error state on the modal
'
,
()
=>
{
expect
(
state
.
modal
.
error
).
to
Equal
(
'
There was an error deleting the comment.
'
);
expect
(
state
.
modal
.
error
).
to
Be
(
'
There was an error deleting the comment.
'
);
});
});
...
...
@@ -601,7 +601,7 @@ describe('vulnerabilities module mutations', () => {
});
it
(
'
should set the error state on the modal
'
,
()
=>
{
expect
(
state
.
modal
.
error
).
to
Equal
(
'
There was an error adding the comment.
'
);
expect
(
state
.
modal
.
error
).
to
Be
(
'
There was an error adding the comment.
'
);
});
});
...
...
@@ -665,7 +665,7 @@ describe('vulnerabilities module mutations', () => {
});
it
(
'
should set the error state on the modal
'
,
()
=>
{
expect
(
state
.
modal
.
error
).
to
Equal
(
'
There was an error reverting the dismissal.
'
);
expect
(
state
.
modal
.
error
).
to
Be
(
'
There was an error reverting the dismissal.
'
);
});
});
...
...
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