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
f42a60ee
Commit
f42a60ee
authored
Oct 07, 2020
by
a_luna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing spec for worker
parent
b18cdc7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
ee/spec/workers/update_max_seats_used_for_gitlab_com_subscriptions_worker_spec.rb
...ax_seats_used_for_gitlab_com_subscriptions_worker_spec.rb
+11
-2
No files found.
ee/spec/workers/update_max_seats_used_for_gitlab_com_subscriptions_worker_spec.rb
View file @
f42a60ee
...
...
@@ -124,12 +124,21 @@ RSpec.describe UpdateMaxSeatsUsedForGitlabComSubscriptionsWorker do
describe
'.last_enqueue_time'
do
it
'returns last_enqueue_time from the cron job instance'
do
time
=
Time
.
current
job
=
double
(
Sidekiq
::
Cron
::
Job
,
last_enqueue_time:
time
)
allow
(
Sidekiq
::
Cron
::
Job
).
to
receive
(
:find
)
.
with
(
'update_max_seats_used_for_gitlab_com_subscriptions_worker'
)
.
and_return
(
job
)
.
and_return
(
double
(
Sidekiq
::
Cron
::
Job
,
last_enqueue_time:
time
)
)
expect
(
described_class
.
last_enqueue_time
).
to
eq
(
time
)
end
context
'when job is not found'
do
it
'returns nil'
do
allow
(
Sidekiq
::
Cron
::
Job
).
to
receive
(
:find
)
.
with
(
'update_max_seats_used_for_gitlab_com_subscriptions_worker'
)
.
and_return
(
nil
)
expect
(
described_class
.
last_enqueue_time
).
to
be_nil
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