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
e37bf8d7
Commit
e37bf8d7
authored
Dec 17, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix spec/models/project_spec.rb
parent
1010005d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
33 deletions
+0
-33
spec/models/project_spec.rb
spec/models/project_spec.rb
+0
-33
No files found.
spec/models/project_spec.rb
View file @
e37bf8d7
...
...
@@ -1762,39 +1762,6 @@ describe Project, models: true do
end
end
describe
'.where_paths_in'
do
context
'without any paths'
do
it
'returns an empty relation'
do
expect
(
Project
.
where_paths_in
([])).
to
eq
([])
end
end
context
'without any valid paths'
do
it
'returns an empty relation'
do
expect
(
Project
.
where_paths_in
(
%w[foo]
)).
to
eq
([])
end
end
context
'with valid paths'
do
let!
(
:project1
)
{
create
(
:project
)
}
let!
(
:project2
)
{
create
(
:project
)
}
it
'returns the projects matching the paths'
do
projects
=
Project
.
where_paths_in
([
project1
.
path_with_namespace
,
project2
.
path_with_namespace
])
expect
(
projects
).
to
contain_exactly
(
project1
,
project2
)
end
it
'returns projects regardless of the casing of paths'
do
projects
=
Project
.
where_paths_in
([
project1
.
path_with_namespace
.
upcase
,
project2
.
path_with_namespace
.
upcase
])
expect
(
projects
).
to
contain_exactly
(
project1
,
project2
)
end
end
end
describe
'#find_path_lock'
do
let
(
:project
)
{
create
:empty_project
}
let
(
:path_lock
)
{
create
:path_lock
,
project:
project
}
...
...
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