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
a61455cd
Commit
a61455cd
authored
Dec 02, 2021
by
Siddharth Asthana
Committed by
Peter Leitzen
Jan 12, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Style/OpenStructUse offenses for users and package specs
Changelog: other
parent
0b096a99
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
5 deletions
+3
-5
.rubocop_todo/style/open_struct_use.yml
.rubocop_todo/style/open_struct_use.yml
+0
-2
spec/models/user_spec.rb
spec/models/user_spec.rb
+1
-1
spec/presenters/packages/nuget/search_results_presenter_spec.rb
...resenters/packages/nuget/search_results_presenter_spec.rb
+2
-2
No files found.
.rubocop_todo/style/open_struct_use.yml
View file @
a61455cd
...
...
@@ -43,8 +43,6 @@ Style/OpenStructUse:
-
spec/lib/gitlab/quick_actions/command_definition_spec.rb
-
spec/models/design_management/design_action_spec.rb
-
spec/models/design_management/design_at_version_spec.rb
-
spec/models/user_spec.rb
-
spec/presenters/packages/nuget/search_results_presenter_spec.rb
-
spec/services/packages/nuget/metadata_extraction_service_spec.rb
-
spec/services/projects/import_service_spec.rb
-
spec/services/system_note_service_spec.rb
...
...
spec/models/user_spec.rb
View file @
a61455cd
...
...
@@ -1388,7 +1388,7 @@ RSpec.describe User do
end
describe
'#update_tracked_fields!'
,
:clean_gitlab_redis_shared_state
do
let
(
:request
)
{
OpenStruct
.
new
(
remote_ip:
"127.0.0.1"
)
}
let
(
:request
)
{
double
(
'request'
,
remote_ip:
"127.0.0.1"
)
}
let
(
:user
)
{
create
(
:user
)
}
it
'writes trackable attributes'
do
...
...
spec/presenters/packages/nuget/search_results_presenter_spec.rb
View file @
a61455cd
...
...
@@ -9,9 +9,9 @@ RSpec.describe Packages::Nuget::SearchResultsPresenter do
let_it_be
(
:tag2
)
{
create
(
:packages_tag
,
package:
package_a
,
name:
'tag2'
)
}
let_it_be
(
:packages_b
)
{
create_list
(
:nuget_package
,
5
,
project:
project
,
name:
'DummyPackageB'
)
}
let_it_be
(
:packages_c
)
{
create_list
(
:nuget_package
,
5
,
project:
project
,
name:
'DummyPackageC'
)
}
let_it_be
(
:search_results
)
{
OpenStruct
.
new
(
total_count:
3
,
results:
[
package_a
,
packages_b
,
packages_c
].
flatten
)
}
let_it_be
(
:presenter
)
{
described_class
.
new
(
search_results
)
}
let
(
:search_results
)
{
double
(
'search_results'
,
total_count:
3
,
results:
[
package_a
,
packages_b
,
packages_c
].
flatten
)
}
let
(
:presenter
)
{
described_class
.
new
(
search_results
)
}
let
(
:total_count
)
{
presenter
.
total_count
}
let
(
:data
)
{
presenter
.
data
}
...
...
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