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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
d5dae8e5
Commit
d5dae8e5
authored
Jun 11, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed specs
parent
7469b58e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
18 deletions
+29
-18
spec/javascripts/ide/stores/modules/merge_requests/actions_spec.js
...scripts/ide/stores/modules/merge_requests/actions_spec.js
+29
-18
No files found.
spec/javascripts/ide/stores/modules/merge_requests/actions_spec.js
View file @
d5dae8e5
...
@@ -199,28 +199,39 @@ describe('IDE merge requests actions', () => {
...
@@ -199,28 +199,39 @@ describe('IDE merge requests actions', () => {
});
});
it
(
'
commits reset mutations and actions
'
,
done
=>
{
it
(
'
commits reset mutations and actions
'
,
done
=>
{
testAction
(
const
commit
=
jasmine
.
createSpy
();
openMergeRequest
,
const
dispatch
=
jasmine
.
createSpy
().
and
.
returnValue
(
Promise
.
resolve
());
{
projectPath
:
'
gitlab-org/gitlab-ce
'
,
id
:
'
1
'
},
openMergeRequest
({
commit
,
dispatch
},
{
projectPath
:
'
gitlab-org/gitlab-ce
'
,
id
:
'
1
'
});
mockedState
,
[
setTimeout
(()
=>
{
{
type
:
'
CLEAR_PROJECTS
'
},
expect
(
commit
.
calls
.
argsFor
(
0
)).
toEqual
([
'
CLEAR_PROJECTS
'
,
null
,
{
root
:
true
}]);
{
type
:
'
SET_CURRENT_MERGE_REQUEST
'
,
payload
:
'
1
'
},
expect
(
commit
.
calls
.
argsFor
(
1
)).
toEqual
([
'
SET_CURRENT_MERGE_REQUEST
'
,
'
1
'
,
{
root
:
true
}]);
{
type
:
'
RESET_OPEN_FILES
'
},
expect
(
commit
.
calls
.
argsFor
(
2
)).
toEqual
([
'
RESET_OPEN_FILES
'
,
null
,
{
root
:
true
}]);
],
[
expect
(
dispatch
.
calls
.
argsFor
(
0
)).
toEqual
([
{
type
:
'
pipelines/stopPipelinePolling
'
},
'
pipelines/resetLatestPipeline
'
,
{
type
:
'
pipelines/clearEtagPoll
'
},
null
,
{
type
:
'
pipelines/resetLatestPipeline
'
},
{
root
:
true
},
{
type
:
'
setCurrentBranchId
'
,
payload
:
''
},
]);
],
expect
(
dispatch
.
calls
.
argsFor
(
1
)).
toEqual
([
'
setCurrentBranchId
'
,
''
,
{
root
:
true
}]);
done
,
expect
(
dispatch
.
calls
.
argsFor
(
2
)).
toEqual
([
);
'
pipelines/stopPipelinePolling
'
,
null
,
{
root
:
true
},
]);
expect
(
dispatch
.
calls
.
argsFor
(
3
)).
toEqual
([
'
pipelines/clearEtagPoll
'
,
null
,
{
root
:
true
},
]);
done
();
});
});
});
it
(
'
pushes new route
'
,
()
=>
{
it
(
'
pushes new route
'
,
()
=>
{
openMergeRequest
(
openMergeRequest
(
{
commit
()
{},
dispatch
()
{}
},
{
commit
()
{},
dispatch
:
()
=>
Promise
.
resolve
()
},
{
projectPath
:
'
gitlab-org/gitlab-ce
'
,
id
:
'
1
'
},
{
projectPath
:
'
gitlab-org/gitlab-ce
'
,
id
:
'
1
'
},
);
);
...
...
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