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
279962c7
Commit
279962c7
authored
Mar 23, 2020
by
Arturo Herrero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove query count specs
parent
413455ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
30 deletions
+0
-30
spec/controllers/admin/services_controller_spec.rb
spec/controllers/admin/services_controller_spec.rb
+0
-30
No files found.
spec/controllers/admin/services_controller_spec.rb
View file @
279962c7
...
...
@@ -9,36 +9,6 @@ describe Admin::ServicesController do
sign_in
(
admin
)
end
describe
'GET #index'
do
it
'uses less than 100 SQL queries limit'
do
query_count
=
ActiveRecord
::
QueryRecorder
.
new
{
get
:index
}.
count
expect
(
query_count
).
to
be
<
100
end
context
'with all existing templates'
do
before
do
Service
.
insert_all
(
Service
.
available_services_types
.
map
{
|
type
|
{
template:
true
,
type:
type
}
}
)
end
it
'avoids N+1 queries'
do
control_count
=
ActiveRecord
::
QueryRecorder
.
new
{
get
:index
}.
count
Service
.
insert_all
(
[
{
template:
true
,
type:
'Service1'
},
{
template:
true
,
type:
'Service2'
},
{
template:
true
,
type:
'Service3'
}
]
)
expect
{
get
:index
}.
not_to
exceed_query_limit
(
control_count
)
end
end
end
describe
'GET #edit'
do
let!
(
:service
)
do
create
(
:jira_service
,
:template
)
...
...
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