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
Jérome Perrin
gitlab-ce
Commits
e2bcb3a4
Commit
e2bcb3a4
authored
Nov 03, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed specs
parent
4119e92b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
11 deletions
+4
-11
app/controllers/projects/refs_controller.rb
app/controllers/projects/refs_controller.rb
+1
-1
spec/controllers/projects/refs_controller_spec.rb
spec/controllers/projects/refs_controller_spec.rb
+3
-5
spec/features/projects/tree/create_directory_spec.rb
spec/features/projects/tree/create_directory_spec.rb
+0
-5
No files found.
app/controllers/projects/refs_controller.rb
View file @
e2bcb3a4
...
@@ -60,7 +60,7 @@ class Projects::RefsController < Projects::ApplicationController
...
@@ -60,7 +60,7 @@ class Projects::RefsController < Projects::ApplicationController
file_name:
content
.
name
,
file_name:
content
.
name
,
commit:
last_commit
,
commit:
last_commit
,
type:
content
.
type
,
type:
content
.
type
,
commit_path:
project_commit_path
(
@project
,
last_commit
)
commit_path:
(
project_commit_path
(
@project
,
last_commit
)
unless
last_commit
.
nil?
)
}
}
end
end
end
end
...
...
spec/controllers/projects/refs_controller_spec.rb
View file @
e2bcb3a4
...
@@ -19,13 +19,13 @@ describe Projects::RefsController do
...
@@ -19,13 +19,13 @@ describe Projects::RefsController do
format:
format
format:
format
end
end
def
xhr_get
(
format
=
:html
,
path
=
'foo/bar/baz.html'
)
def
xhr_get
(
format
=
:html
)
xhr
:get
,
xhr
:get
,
:logs_tree
,
:logs_tree
,
namespace_id:
project
.
namespace
.
to_param
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
,
project_id:
project
,
id:
'master'
,
id:
'master'
,
path:
path
,
path:
'foo/bar/baz.html'
,
format:
format
format:
format
end
end
...
@@ -47,12 +47,10 @@ describe Projects::RefsController do
...
@@ -47,12 +47,10 @@ describe Projects::RefsController do
end
end
it
'renders JSON'
do
it
'renders JSON'
do
xhr_get
(
:json
,
'/'
)
xhr_get
(
:json
)
expect
(
response
).
to
be_success
expect
(
response
).
to
be_success
expect
(
json_response
).
to
be_kind_of
(
Array
)
expect
(
json_response
).
to
be_kind_of
(
Array
)
expect
(
json_response
[
0
][
'type'
]).
to
eq
(
'tree'
)
expect
(
json_response
[
0
][
'file_name'
]).
to
eq
(
'bar'
)
end
end
end
end
end
end
spec/features/projects/tree/create_directory_spec.rb
View file @
e2bcb3a4
...
@@ -31,10 +31,5 @@ feature 'Multi-file editor new directory', :js do
...
@@ -31,10 +31,5 @@ feature 'Multi-file editor new directory', :js do
click_button
(
'Commit 1 file'
)
click_button
(
'Commit 1 file'
)
expect
(
page
).
to
have_selector
(
'td'
,
text:
'commit message'
)
expect
(
page
).
to
have_selector
(
'td'
,
text:
'commit message'
)
click_link
(
'foldername'
)
expect
(
page
).
to
have_selector
(
'td'
,
text:
'commit message'
,
count:
2
)
expect
(
page
).
to
have_selector
(
'td'
,
text:
'.gitkeep'
)
end
end
end
end
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