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
11e8df41
Commit
11e8df41
authored
Jun 22, 2021
by
Małgorzata Ksionek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lower spec bar for number of sql queries
parent
a6ae996d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
8 deletions
+9
-8
app/models/user.rb
app/models/user.rb
+2
-1
spec/requests/api/graphql/mutations/merge_requests/set_assignees_spec.rb
...pi/graphql/mutations/merge_requests/set_assignees_spec.rb
+5
-5
spec/requests/api/import_bitbucket_server_spec.rb
spec/requests/api/import_bitbucket_server_spec.rb
+1
-1
spec/services/repositories/changelog_service_spec.rb
spec/services/repositories/changelog_service_spec.rb
+1
-1
No files found.
app/models/user.rb
View file @
11e8df41
...
...
@@ -1870,9 +1870,10 @@ class User < ApplicationRecord
end
def
password_expired_if_applicable?
return
false
unless
password_expired?
return
false
unless
allow_password_authentication?
password_expired?
true
end
def
can_be_deactivated?
...
...
spec/requests/api/graphql/mutations/merge_requests/set_assignees_spec.rb
View file @
11e8df41
...
...
@@ -68,7 +68,7 @@ RSpec.describe 'Setting assignees of a merge request', :assume_throttled do
context
'when the current user does not have permission to add assignees'
do
let
(
:current_user
)
{
create
(
:user
)
}
let
(
:db_query_limit
)
{
2
8
}
let
(
:db_query_limit
)
{
2
7
}
it
'does not change the assignees'
do
project
.
add_guest
(
current_user
)
...
...
@@ -80,7 +80,7 @@ RSpec.describe 'Setting assignees of a merge request', :assume_throttled do
end
context
'with assignees already assigned'
do
let
(
:db_query_limit
)
{
46
}
let
(
:db_query_limit
)
{
39
}
before
do
merge_request
.
assignees
=
[
assignee2
]
...
...
@@ -96,7 +96,7 @@ RSpec.describe 'Setting assignees of a merge request', :assume_throttled do
end
context
'when passing an empty list of assignees'
do
let
(
:db_query_limit
)
{
3
2
}
let
(
:db_query_limit
)
{
3
1
}
let
(
:input
)
{
{
assignee_usernames:
[]
}
}
before
do
...
...
@@ -115,7 +115,7 @@ RSpec.describe 'Setting assignees of a merge request', :assume_throttled do
context
'when passing append as true'
do
let
(
:mode
)
{
Types
::
MutationOperationModeEnum
.
enum
[
:append
]
}
let
(
:input
)
{
{
assignee_usernames:
[
assignee2
.
username
],
operation_mode:
mode
}
}
let
(
:db_query_limit
)
{
2
2
}
let
(
:db_query_limit
)
{
2
1
}
before
do
# In CE, APPEND is a NOOP as you can't have multiple assignees
...
...
@@ -135,7 +135,7 @@ RSpec.describe 'Setting assignees of a merge request', :assume_throttled do
end
context
'when passing remove as true'
do
let
(
:db_query_limit
)
{
3
2
}
let
(
:db_query_limit
)
{
3
1
}
let
(
:mode
)
{
Types
::
MutationOperationModeEnum
.
enum
[
:remove
]
}
let
(
:input
)
{
{
assignee_usernames:
[
assignee
.
username
],
operation_mode:
mode
}
}
let
(
:expected_result
)
{
[]
}
...
...
spec/requests/api/import_bitbucket_server_spec.rb
View file @
11e8df41
...
...
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec
.
describe
API
::
ImportBitbucketServer
do
let
(
:base_uri
)
{
"https://test:7990"
}
let
(
:user
)
{
create
(
:user
,
bio:
'test'
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:token
)
{
"asdasd12345"
}
let
(
:secret
)
{
"sekrettt"
}
let
(
:project_key
)
{
'TES'
}
...
...
spec/services/repositories/changelog_service_spec.rb
View file @
11e8df41
...
...
@@ -76,7 +76,7 @@ RSpec.describe Repositories::ChangelogService do
recorder
=
ActiveRecord
::
QueryRecorder
.
new
{
service
.
execute
}
changelog
=
project
.
repository
.
blob_at
(
'master'
,
'CHANGELOG.md'
)
&
.
data
expect
(
recorder
.
count
).
to
eq
(
1
2
)
expect
(
recorder
.
count
).
to
eq
(
1
1
)
expect
(
changelog
).
to
include
(
'Title 1'
,
'Title 2'
)
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