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
fc451b7d
Commit
fc451b7d
authored
Oct 13, 2017
by
micael.bergeron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove spec for non-existent endpoint
parent
df7e1592
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
42 deletions
+0
-42
spec/controllers/projects/issues_controller_spec.rb
spec/controllers/projects/issues_controller_spec.rb
+0
-42
No files found.
spec/controllers/projects/issues_controller_spec.rb
View file @
fc451b7d
...
@@ -877,46 +877,4 @@ describe Projects::IssuesController do
...
@@ -877,46 +877,4 @@ describe Projects::IssuesController do
format: :json
format: :json
end
end
end
end
describe
'GET #discussions'
do
let!
(
:discussion
)
{
create
(
:discussion_note_on_issue
,
noteable:
issue
,
project:
issue
.
project
)
}
context
'when authenticated'
do
before
do
project
.
add_developer
(
user
)
sign_in
(
user
)
end
it
'returns discussion json'
do
get
:discussions
,
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
issue
.
iid
expect
(
json_response
.
first
.
keys
).
to
match_array
(
%w[id reply_id expanded notes individual_note]
)
end
end
context
'with cross-reference system note'
,
:request_store
do
let
(
:new_issue
)
{
create
(
:issue
)
}
let
(
:cross_reference
)
{
"mentioned in
#{
new_issue
.
to_reference
(
issue
.
project
)
}
"
}
before
do
create
(
:discussion_note_on_issue
,
:system
,
noteable:
issue
,
project:
issue
.
project
,
note:
cross_reference
)
end
it
'does not result in N+1 queries'
do
# Instantiate the controller variables to ensure QueryRecorder has an accurate base count
get
:discussions
,
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
issue
.
iid
RequestStore
.
clear!
control_count
=
ActiveRecord
::
QueryRecorder
.
new
do
get
:discussions
,
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
issue
.
iid
end
.
count
RequestStore
.
clear!
create_list
(
:discussion_note_on_issue
,
2
,
:system
,
noteable:
issue
,
project:
issue
.
project
,
note:
cross_reference
)
expect
{
get
:discussions
,
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
issue
.
iid
}.
not_to
exceed_query_limit
(
control_count
)
end
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