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
Boxiang Sun
gitlab-ce
Commits
0ac3cd80
Commit
0ac3cd80
authored
Aug 16, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed karma spec
parent
2cf1e21a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
spec/javascripts/ide/stores/actions/file_spec.js
spec/javascripts/ide/stores/actions/file_spec.js
+14
-6
No files found.
spec/javascripts/ide/stores/actions/file_spec.js
View file @
0ac3cd80
...
...
@@ -352,10 +352,22 @@ describe('IDE store file actions', () => {
it
(
'
calls also getBaseRawFileData service method
'
,
done
=>
{
spyOn
(
service
,
'
getBaseRawFileData
'
).
and
.
returnValue
(
Promise
.
resolve
(
'
baseraw
'
));
store
.
state
.
currentProjectId
=
'
gitlab-org/gitlab-ce
'
;
store
.
state
.
currentMergeRequestId
=
'
1
'
;
store
.
state
.
projects
=
{
'
gitlab-org/gitlab-ce
'
:
{
mergeRequests
:
{
1
:
{
baseCommitSha
:
'
SHA
'
,
},
},
},
};
tmpFile
.
mrChange
=
{
new_file
:
false
};
store
.
dispatch
(
'
getRawFileData
'
,
{
path
:
tmpFile
.
path
,
baseSha
:
'
SHA
'
})
.
dispatch
(
'
getRawFileData
'
,
{
path
:
tmpFile
.
path
})
.
then
(()
=>
{
expect
(
service
.
getBaseRawFileData
).
toHaveBeenCalledWith
(
tmpFile
,
'
SHA
'
);
expect
(
tmpFile
.
baseRaw
).
toBe
(
'
baseraw
'
);
...
...
@@ -392,10 +404,7 @@ describe('IDE store file actions', () => {
const
dispatch
=
jasmine
.
createSpy
(
'
dispatch
'
);
actions
.
getRawFileData
(
{
state
:
store
.
state
,
commit
()
{},
dispatch
},
{
path
:
tmpFile
.
path
,
baseSha
:
tmpFile
.
baseSha
},
)
.
getRawFileData
({
state
:
store
.
state
,
commit
()
{},
dispatch
},
{
path
:
tmpFile
.
path
})
.
then
(
done
.
fail
)
.
catch
(()
=>
{
expect
(
dispatch
).
toHaveBeenCalledWith
(
'
setErrorMessage
'
,
{
...
...
@@ -404,7 +413,6 @@ describe('IDE store file actions', () => {
actionText
:
'
Please try again
'
,
actionPayload
:
{
path
:
tmpFile
.
path
,
baseSha
:
tmpFile
.
baseSha
,
},
});
...
...
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