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
ed9f6e3f
Commit
ed9f6e3f
authored
Jan 20, 2022
by
huzaifaiftikhar1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename variables in RSpecs for consistency
parent
327ac75e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
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
+2
-2
spec/controllers/explore/projects_controller_spec.rb
spec/controllers/explore/projects_controller_spec.rb
+2
-2
spec/requests/users_controller_spec.rb
spec/requests/users_controller_spec.rb
+4
-4
No files found.
ee/spec/finders/ee/projects_finder_spec.rb
View file @
ed9f6e3f
...
...
@@ -52,7 +52,7 @@ RSpec.describe ProjectsFinder do
context
'filter by aimed for deletion'
do
let_it_be
(
:params
)
{
{
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
(
aimed_for_deletion_project
)
}
end
...
...
spec/controllers/dashboard/projects_controller_spec.rb
View file @
ed9f6e3f
...
...
@@ -97,7 +97,7 @@ RSpec.describe Dashboard::ProjectsController, :aggregate_failures do
subject
{
get
:starred
,
format: :json
}
let
(
:projects
)
{
create_list
(
:project
,
2
,
creator:
user
)
}
let
(
:
pending
_deletion_project
)
{
create_list
(
:project
,
2
,
:archived
,
creator:
user
,
marked_for_deletion_at:
3
.
days
.
ago
)
}
let
(
:
aimed_for
_deletion_project
)
{
create_list
(
:project
,
2
,
:archived
,
creator:
user
,
marked_for_deletion_at:
3
.
days
.
ago
)
}
before
do
projects
.
each
do
|
project
|
...
...
@@ -105,7 +105,7 @@ RSpec.describe Dashboard::ProjectsController, :aggregate_failures do
create
(
:users_star_project
,
project_id:
project
.
id
,
user_id:
user
.
id
)
end
pending
_deletion_project
.
each
do
|
project
|
aimed_for
_deletion_project
.
each
do
|
project
|
project
.
add_developer
(
user
)
create
(
:users_star_project
,
project_id:
project
.
id
,
user_id:
user
.
id
)
end
...
...
spec/controllers/explore/projects_controller_spec.rb
View file @
ed9f6e3f
...
...
@@ -77,12 +77,12 @@ RSpec.describe Explore::ProjectsController do
context
'projects pending deletion'
do
let
(
:project1
)
{
create
(
:project
,
:public
,
updated_at:
3
.
days
.
ago
)
}
let
(
:project2
)
{
create
(
:project
,
:public
,
updated_at:
1
.
day
.
ago
)
}
let
(
:
pending
_deletion_project
)
{
create
(
:project
,
:public
,
:archived
,
updated_at:
2
.
days
.
ago
,
marked_for_deletion_at:
2
.
days
.
ago
)
}
let
(
:
aimed_for
_deletion_project
)
{
create
(
:project
,
:public
,
:archived
,
updated_at:
2
.
days
.
ago
,
marked_for_deletion_at:
2
.
days
.
ago
)
}
before
do
create
(
:trending_project
,
project:
project1
)
create
(
:trending_project
,
project:
project2
)
create
(
:trending_project
,
project:
pending
_deletion_project
)
create
(
:trending_project
,
project:
aimed_for
_deletion_project
)
end
it
'does not list projects pending deletion'
do
...
...
spec/requests/users_controller_spec.rb
View file @
ed9f6e3f
...
...
@@ -506,7 +506,7 @@ RSpec.describe UsersController do
describe
'GET #contributed'
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_contributed_projects_url
author
.
username
,
format:
format
...
...
@@ -517,10 +517,10 @@ RSpec.describe UsersController do
project
.
add_developer
(
public_user
)
project
.
add_developer
(
private_user
)
pending
_deletion_project
.
add_developer
(
public_user
)
pending
_deletion_project
.
add_developer
(
private_user
)
aimed_for
_deletion_project
.
add_developer
(
public_user
)
aimed_for
_deletion_project
.
add_developer
(
private_user
)
create
(
:push_event
,
project:
project
,
author:
author
)
create
(
:push_event
,
project:
pending
_deletion_project
,
author:
author
)
create
(
:push_event
,
project:
aimed_for
_deletion_project
,
author:
author
)
subject
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