File tree 2 files changed +16
-0
lines changed
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={})
30
30
put ( "/jobs/#{ job_id } /cancel" , nil , options )
31
31
end
32
32
33
+ def self . finish ( job_id , options = { } )
34
+ put ( "/jobs/#{ job_id } /finish" , nil , options )
35
+ end
36
+
33
37
end
34
38
end
Original file line number Diff line number Diff line change @@ -101,5 +101,17 @@ class Zencoder::JobTest < Test::Unit::TestCase
101
101
end
102
102
end
103
103
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
+
104
116
end
105
117
end
You can’t perform that action at this time.
0 commit comments