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
9e004c9a
Commit
9e004c9a
authored
Jan 10, 2020
by
Steve Abrams
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add not implemented version of set_next_run_at to Schedulable
parent
01bf5655
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
app/models/concerns/schedulable.rb
app/models/concerns/schedulable.rb
+4
-0
spec/models/concerns/schedulable_spec.rb
spec/models/concerns/schedulable_spec.rb
+15
-0
No files found.
app/models/concerns/schedulable.rb
View file @
9e004c9a
...
...
@@ -14,4 +14,8 @@ module Schedulable
rescue
ActiveRecord
::
RecordInvalid
update_column
(
:next_run_at
,
nil
)
# update without validation
end
def
set_next_run_at
raise
NotImplementedError
end
end
spec/models/concerns/schedulable_spec.rb
View file @
9e004c9a
...
...
@@ -56,4 +56,19 @@ describe Schedulable do
it_behaves_like
'before_save callback'
it_behaves_like
'.runnable_schedules'
end
describe
'#next_run_at'
do
let
(
:schedulable_instance
)
do
Class
.
new
(
ActiveRecord
::
Base
)
do
include
Schedulable
# we need a table for the dummy class to operate
self
.
table_name
=
'users'
end
.
new
end
it
'works'
do
expect
{
schedulable_instance
.
set_next_run_at
}.
to
raise_error
(
NotImplementedError
)
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