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
f31429c1
Commit
f31429c1
authored
Dec 07, 2018
by
Dylan Griffith
Committed by
Bob Van Landuyt
Dec 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Sidekiq::Testing in RepositoryController spec
parent
5d9a2e3b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
spec/controllers/projects/settings/repository_controller_spec.rb
...ntrollers/projects/settings/repository_controller_spec.rb
+6
-4
No files found.
spec/controllers/projects/settings/repository_controller_spec.rb
View file @
f31429c1
...
@@ -19,13 +19,15 @@ describe Projects::Settings::RepositoryController do
...
@@ -19,13 +19,15 @@ describe Projects::Settings::RepositoryController do
end
end
describe
'PUT cleanup'
do
describe
'PUT cleanup'
do
before
do
allow
(
RepositoryCleanupWorker
).
to
receive
(
:perform_async
)
end
def
do_put!
def
do_put!
object_map
=
fixture_file_upload
(
'spec/fixtures/bfg_object_map.txt'
)
object_map
=
fixture_file_upload
(
'spec/fixtures/bfg_object_map.txt'
)
Sidekiq
::
Testing
.
fake!
do
put
:cleanup
,
namespace_id:
project
.
namespace
,
project_id:
project
,
project:
{
object_map:
object_map
}
put
:cleanup
,
namespace_id:
project
.
namespace
,
project_id:
project
,
project:
{
object_map:
object_map
}
end
end
end
context
'feature enabled'
do
context
'feature enabled'
do
it
'enqueues a RepositoryCleanupWorker'
do
it
'enqueues a RepositoryCleanupWorker'
do
...
@@ -34,7 +36,7 @@ describe Projects::Settings::RepositoryController do
...
@@ -34,7 +36,7 @@ describe Projects::Settings::RepositoryController do
do_put!
do_put!
expect
(
response
).
to
redirect_to
project_settings_repository_path
(
project
)
expect
(
response
).
to
redirect_to
project_settings_repository_path
(
project
)
expect
(
RepositoryCleanupWorker
.
jobs
.
count
).
to
eq
(
1
)
expect
(
RepositoryCleanupWorker
).
to
have_received
(
:perform_async
).
once
end
end
end
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