File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -30,5 +30,9 @@ def self.cancel(job_id, options={})
3030 put ( "/jobs/#{ job_id } /cancel" , nil , options )
3131 end
3232
33+ def self . finish ( job_id , options = { } )
34+ put ( "/jobs/#{ job_id } /finish" , nil , options )
35+ end
36+
3337 end
3438end
Original file line number Diff line number Diff line change @@ -101,5 +101,17 @@ class Zencoder::JobTest < Test::Unit::TestCase
101101 end
102102 end
103103
104+ context ".finish" do
105+ setup do
106+ @job_id = 1
107+ @url = "#{ Zencoder . base_url } /jobs/#{ @job_id } /finish"
108+ end
109+
110+ should "PUT the correct url and return a response" do
111+ Zencoder ::HTTP . stubs ( :put ) . with ( @url , nil , :headers => { "Zencoder-Api-Key" => @api_key } ) . returns ( Zencoder ::Response . new )
112+ assert_equal Zencoder ::Response , Zencoder ::Job . finish ( 1 , :api_key => @api_key ) . class
113+ end
114+ end
115+
104116 end
105117end
You can’t perform that action at this time.
0 commit comments