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
dfe0ad2d
Commit
dfe0ad2d
authored
Nov 09, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed specs
parent
5c17c097
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
39 deletions
+13
-39
spec/javascripts/repo/stores/actions/file_spec.js
spec/javascripts/repo/stores/actions/file_spec.js
+1
-1
spec/javascripts/repo/stores/mutations/tree_spec.js
spec/javascripts/repo/stores/mutations/tree_spec.js
+12
-38
No files found.
spec/javascripts/repo/stores/actions/file_spec.js
View file @
dfe0ad2d
...
...
@@ -29,7 +29,7 @@ describe('Multi-file store file actions', () => {
});
afterEach
(()
=>
{
store
.
_actions
.
getLastCommitData
=
[
oldGetLastCommitData
]
;
// eslint-disable-line
store
.
_actions
.
getLastCommitData
=
oldGetLastCommitData
;
// eslint-disable-line
});
it
(
'
closes open files
'
,
(
done
)
=>
{
...
...
spec/javascripts/repo/stores/mutations/tree_spec.js
View file @
dfe0ad2d
...
...
@@ -24,17 +24,15 @@ describe('Multi-file store tree mutations', () => {
});
describe
(
'
SET_DIRECTORY_DATA
'
,
()
=>
{
const
data
=
{
trees
:
[{
name
:
'
tree
'
,
}],
submodules
:
[{
name
:
'
submodule
'
,
}],
blobs
:
[{
name
:
'
blob
'
,
}],
};
const
data
=
[{
name
:
'
tree
'
,
},
{
name
:
'
submodule
'
,
},
{
name
:
'
blob
'
,
}];
it
(
'
adds directory data
'
,
()
=>
{
mutations
.
SET_DIRECTORY_DATA
(
localState
,
{
...
...
@@ -43,33 +41,9 @@ describe('Multi-file store tree mutations', () => {
});
expect
(
localState
.
tree
.
length
).
toBe
(
3
);
expect
(
localState
.
tree
[
0
].
type
).
toBe
(
'
tree
'
);
expect
(
localState
.
tree
[
1
].
type
).
toBe
(
'
submodule
'
);
expect
(
localState
.
tree
[
2
].
type
).
toBe
(
'
blob
'
);
});
it
(
'
defaults to rootUrl when no parent_tree_url is in data
'
,
()
=>
{
localState
.
endpoints
.
rootUrl
=
'
test
'
;
mutations
.
SET_DIRECTORY_DATA
(
localState
,
{
data
,
tree
:
localState
,
});
expect
(
localState
.
tree
[
0
].
parentTreeUrl
).
toBe
(
'
test
'
);
});
it
(
'
uses parent_tree_url from data
'
,
()
=>
{
mutations
.
SET_DIRECTORY_DATA
(
localState
,
{
data
:
{
...
data
,
parent_tree_url
:
'
parent/
'
,
path
:
'
test
'
,
},
tree
:
localState
,
});
expect
(
localState
.
tree
[
0
].
parentTreeUrl
).
toBe
(
'
parent/test
'
);
expect
(
localState
.
tree
[
0
].
name
).
toBe
(
'
tree
'
);
expect
(
localState
.
tree
[
1
].
name
).
toBe
(
'
submodule
'
);
expect
(
localState
.
tree
[
2
].
name
).
toBe
(
'
blob
'
);
});
});
...
...
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