Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/models/solid_queue/recurring_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def supported_schedule

def ensure_command_or_class_present
unless command.present? || class_name.present?
errors.add :base, :command_and_class_blank, message: "either command or class_name must be present"
errors.add :base, :command_and_class_blank, message: "either command or class must be present"
end
end

Expand Down
4 changes: 3 additions & 1 deletion test/models/solid_queue/recurring_task_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ def perform
assert_not recurring_task_with(class_name: "UnknownJob").valid?

# Empty class name and command
assert_not recurring_task_with(key: "task-id", schedule: "every minute").valid?
task = SolidQueue::RecurringTask.from_configuration("task-id", schedule: "every minute")
assert_not task.valid?
assert_includes task.errors[:base], "either command or class must be present"
end

test "task with custom queue and priority" do
Expand Down