aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/test/support
diff options
context:
space:
mode:
authorwvengen <dev-rails@willem.engen.nl>2015-03-18 10:48:26 +0100
committerwvengen <dev-rails@willem.engen.nl>2015-09-17 22:17:39 +0200
commit7059ab35f797c163cd8907abcd7d0830b31e56f7 (patch)
tree708ccbf2da4412030b305f79c629a6961eb487c1 /activejob/test/support
parent61f9e47feac75a2cf4ed9e092bac036294564168 (diff)
downloadrails-7059ab35f797c163cd8907abcd7d0830b31e56f7.tar.gz
rails-7059ab35f797c163cd8907abcd7d0830b31e56f7.tar.bz2
rails-7059ab35f797c163cd8907abcd7d0830b31e56f7.zip
Add job priorities to ActiveJob
Diffstat (limited to 'activejob/test/support')
-rw-r--r--activejob/test/support/integration/test_case_helpers.rb8
-rw-r--r--activejob/test/support/que/inline.rb1
2 files changed, 7 insertions, 2 deletions
diff --git a/activejob/test/support/integration/test_case_helpers.rb b/activejob/test/support/integration/test_case_helpers.rb
index 39aee6d407..8319d09520 100644
--- a/activejob/test/support/integration/test_case_helpers.rb
+++ b/activejob/test/support/integration/test_case_helpers.rb
@@ -42,8 +42,12 @@ module TestCaseHelpers
end
end
- def job_executed
- Dummy::Application.root.join("tmp/#{@id}").exist?
+ def job_executed(id=@id)
+ Dummy::Application.root.join("tmp/#{id}").exist?
+ end
+
+ def job_executed_at(id=@id)
+ File.new(Dummy::Application.root.join("tmp/#{id}")).ctime
end
def job_output
diff --git a/activejob/test/support/que/inline.rb b/activejob/test/support/que/inline.rb
index 0232da1370..0950e52d28 100644
--- a/activejob/test/support/que/inline.rb
+++ b/activejob/test/support/que/inline.rb
@@ -6,6 +6,7 @@ Que::Job.class_eval do
if args.last.is_a?(Hash)
options = args.pop
options.delete(:run_at)
+ options.delete(:priority)
args << options unless options.empty?
end
self.run(*args)