BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
46e0a66a
Unverified
Commit
46e0a66a
authored
Nov 01, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added refs_controller_spec
parent
5a2d9f66
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
refs_controller_spec.rb
spec/controllers/projects/refs_controller_spec.rb
+15
-3
No files found.
spec/controllers/projects/refs_controller_spec.rb
View file @
46e0a66a
...
...
@@ -19,16 +19,19 @@ describe Projects::RefsController do
format:
format
end
def
xhr_get
(
format
=
:html
)
def
xhr_get
(
format
=
:html
,
path
=
'foo/bar/baz.html'
)
xhr
:get
,
:logs_tree
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
,
id:
'master'
,
path:
'foo/bar/baz.html'
,
format:
format
project_id:
project
,
id:
'master'
,
path:
path
,
format:
format
end
it
'never throws MissingTemplate'
do
expect
{
default_get
}.
not_to
raise_error
expect
{
xhr_get
(
:json
)
}.
not_to
raise_error
expect
{
xhr_get
}.
not_to
raise_error
end
...
...
@@ -42,5 +45,14 @@ describe Projects::RefsController do
xhr_get
(
:js
)
expect
(
response
).
to
be_success
end
it
'renders JSON'
do
xhr_get
(
:json
,
'/'
)
expect
(
response
).
to
be_success
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
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