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
3d645a70
Commit
3d645a70
authored
Jan 25, 2022
by
huzaifaiftikhar1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename RSpec example description and a few variables
parent
ed9f6e3f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
13 deletions
+13
-13
ee/spec/finders/ee/projects_finder_spec.rb
ee/spec/finders/ee/projects_finder_spec.rb
+1
-1
spec/controllers/dashboard/projects_controller_spec.rb
spec/controllers/dashboard/projects_controller_spec.rb
+1
-1
spec/controllers/explore/projects_controller_spec.rb
spec/controllers/explore/projects_controller_spec.rb
+2
-2
spec/finders/group_descendants_finder_spec.rb
spec/finders/group_descendants_finder_spec.rb
+1
-1
spec/models/user_spec.rb
spec/models/user_spec.rb
+5
-5
spec/requests/users_controller_spec.rb
spec/requests/users_controller_spec.rb
+3
-3
No files found.
ee/spec/finders/ee/projects_finder_spec.rb
View file @
3d645a70
...
...
@@ -60,7 +60,7 @@ RSpec.describe ProjectsFinder do
context
'filter by not aimed for deletion'
do
let_it_be
(
:params
)
{
{
not_aimed_for_deletion:
true
}
}
let_it_be
(
:aimed_for_deletion_project
)
{
create
(
:project
,
:public
,
marked_for_deletion_at:
2
.
days
.
ago
,
pending_delete:
false
)
}
let_it_be
(
:
deleted
_project
)
{
create
(
:project
,
:public
,
marked_for_deletion_at:
1
.
month
.
ago
,
pending_delete:
true
)
}
let_it_be
(
:
pending_deletion
_project
)
{
create
(
:project
,
:public
,
marked_for_deletion_at:
1
.
month
.
ago
,
pending_delete:
true
)
}
it
{
is_expected
.
to
contain_exactly
(
ultimate_project
,
ultimate_project2
,
premium_project
,
no_plan_project
)
}
end
...
...
spec/controllers/dashboard/projects_controller_spec.rb
View file @
3d645a70
...
...
@@ -129,7 +129,7 @@ RSpec.describe Dashboard::ProjectsController, :aggregate_failures do
end
end
it
'does not include projects
pending
deletion'
do
it
'does not include projects
aimed for
deletion'
do
subject
expect
(
assigns
(
:projects
).
count
).
to
eq
(
2
)
...
...
spec/controllers/explore/projects_controller_spec.rb
View file @
3d645a70
...
...
@@ -74,7 +74,7 @@ RSpec.describe Explore::ProjectsController do
end
end
context
'projects
pending
deletion'
do
context
'projects
aimed for
deletion'
do
let
(
:project1
)
{
create
(
:project
,
:public
,
updated_at:
3
.
days
.
ago
)
}
let
(
:project2
)
{
create
(
:project
,
:public
,
updated_at:
1
.
day
.
ago
)
}
let
(
:aimed_for_deletion_project
)
{
create
(
:project
,
:public
,
:archived
,
updated_at:
2
.
days
.
ago
,
marked_for_deletion_at:
2
.
days
.
ago
)
}
...
...
@@ -85,7 +85,7 @@ RSpec.describe Explore::ProjectsController do
create
(
:trending_project
,
project:
aimed_for_deletion_project
)
end
it
'does not list projects
pending
deletion'
do
it
'does not list projects
aimed for
deletion'
do
get
:trending
expect
(
assigns
(
:projects
)).
to
eq
[
project2
,
project1
]
...
...
spec/finders/group_descendants_finder_spec.rb
View file @
3d645a70
...
...
@@ -68,7 +68,7 @@ RSpec.describe GroupDescendantsFinder do
expect
(
finder
.
execute
).
to
be_empty
end
it
'does not include projects
pending
deletion'
do
it
'does not include projects
aimed for
deletion'
do
_project_aimed_for_deletion
=
create
(
:project
,
:archived
,
marked_for_deletion_at:
2
.
days
.
ago
,
pending_delete:
false
)
expect
(
finder
.
execute
).
to
be_empty
...
...
spec/models/user_spec.rb
View file @
3d645a70
...
...
@@ -3602,16 +3602,16 @@ RSpec.describe User do
let!
(
:project1
)
{
create
(
:project
)
}
let!
(
:project2
)
{
fork_project
(
project3
)
}
let!
(
:project3
)
{
create
(
:project
)
}
let!
(
:project_
pending
_deletion
)
{
create
(
:project
,
marked_for_deletion_at:
2
.
days
.
ago
,
pending_delete:
false
)
}
let!
(
:project_
aimed_for
_deletion
)
{
create
(
:project
,
marked_for_deletion_at:
2
.
days
.
ago
,
pending_delete:
false
)
}
let!
(
:merge_request
)
{
create
(
:merge_request
,
source_project:
project2
,
target_project:
project3
,
author:
subject
)
}
let!
(
:push_event
)
{
create
(
:push_event
,
project:
project1
,
author:
subject
)
}
let!
(
:merge_event
)
{
create
(
:event
,
:created
,
project:
project3
,
target:
merge_request
,
author:
subject
)
}
let!
(
:merge_event_2
)
{
create
(
:event
,
:created
,
project:
project_
pending
_deletion
,
target:
merge_request
,
author:
subject
)
}
let!
(
:merge_event_2
)
{
create
(
:event
,
:created
,
project:
project_
aimed_for
_deletion
,
target:
merge_request
,
author:
subject
)
}
before
do
project1
.
add_maintainer
(
subject
)
project2
.
add_maintainer
(
subject
)
project_
pending
_deletion
.
add_maintainer
(
subject
)
project_
aimed_for
_deletion
.
add_maintainer
(
subject
)
end
it
'includes IDs for projects the user has pushed to'
do
...
...
@@ -3626,8 +3626,8 @@ RSpec.describe User do
expect
(
subject
.
contributed_projects
).
not_to
include
(
project2
)
end
it
"doesn't include projects
pending
deletion"
do
expect
(
subject
.
contributed_projects
).
not_to
include
(
project_
pending
_deletion
)
it
"doesn't include projects
aimed for
deletion"
do
expect
(
subject
.
contributed_projects
).
not_to
include
(
project_
aimed_for
_deletion
)
end
end
...
...
spec/requests/users_controller_spec.rb
View file @
3d645a70
...
...
@@ -531,7 +531,7 @@ RSpec.describe UsersController do
expect
(
response
.
body
).
not_to
be_empty
end
it
'does not list projects
pending
deletion'
do
it
'does not list projects
aimed for
deletion'
do
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
expect
(
assigns
(
:contributed_projects
)).
to
eq
([
project
])
end
...
...
@@ -566,7 +566,7 @@ RSpec.describe UsersController do
describe
'GET #starred'
do
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:
pending
_deletion_project
)
{
create
(
:project
,
:public
,
:archived
,
marked_for_deletion_at:
3
.
days
.
ago
)
}
let
(
:
aimed_for
_deletion_project
)
{
create
(
:project
,
:public
,
:archived
,
marked_for_deletion_at:
3
.
days
.
ago
)
}
subject
do
get
user_starred_projects_url
author
.
username
,
format:
format
...
...
@@ -585,7 +585,7 @@ RSpec.describe UsersController do
expect
(
response
.
body
).
not_to
be_empty
end
it
'does not list projects
pending
deletion'
do
it
'does not list projects
aimed for
deletion'
do
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
expect
(
assigns
(
:starred_projects
)).
to
eq
([
project
])
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