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
d61fbeb9
Commit
d61fbeb9
authored
May 27, 2020
by
Mayra Cabrera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes WordArray cop on repository model spec
Fixes Style/WordArray on repository model spec
parent
dfbba26d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
spec/models/repository_spec.rb
spec/models/repository_spec.rb
+2
-6
No files found.
spec/models/repository_spec.rb
View file @
d61fbeb9
...
...
@@ -1446,17 +1446,13 @@ describe Repository do
let
(
:empty_repository
)
{
create
(
:project_empty_repo
).
repository
}
it
'returns empty array for an empty repository'
do
# rubocop:disable Style/WordArray
expect
(
empty_repository
.
blobs_at
([
'master'
,
'foobar'
])).
to
eq
([])
# rubocop:enable Style/WordArray
expect
(
empty_repository
.
blobs_at
(
%w[master foobar]
)).
to
eq
([])
end
it
'returns blob array for a non-empty repository'
do
repository
.
create_file
(
User
.
last
,
'foobar'
,
'CONTENT'
,
message:
'message'
,
branch_name:
'master'
)
# rubocop:disable Style/WordArray
blobs
=
repository
.
blobs_at
([[
'master'
,
'foobar'
]])
# rubocop:enable Style/WordArray
blobs
=
repository
.
blobs_at
([
%w[master foobar]
])
expect
(
blobs
.
first
.
name
).
to
eq
(
'foobar'
)
expect
(
blobs
.
size
).
to
eq
(
1
)
...
...
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