Commit ddb55738 authored by marcheing's avatar marcheing Committed by Diego de Araújo Martinez Camarinha

Rename upload to zencoder to request zencoder job

Signed-off-by: Diego de Araújo Martinez Camarinha's avatarDiego Araújo <diegoamc@protonmail.ch>
parent b3991b41
class UploadToZencoderJob < ApplicationJob
class RequestZencoderJob < ApplicationJob
queue_as :zencoder
def perform(*args)
......
......@@ -17,7 +17,7 @@ class Content < ApplicationRecord
private
def send_to_zencoder
UploadToZencoderJob.perform_later(self)
RequestZencoderJob.perform_later(self)
end
end
require 'rails_helper'
RSpec.describe UploadToZencoderJob, type: :job do
RSpec.describe RequestZencoderJob, type: :job do
describe 'perform' do
let(:video) { build(:video, id: 1 ) }
let(:response_body) { { 'id' => 12 } }
......
......@@ -24,7 +24,7 @@ RSpec.describe Content, type: :model do
context 'after create' do
subject { build(:video) }
it 'creates an Upload to Zencoder Job' do
expect(UploadToZencoderJob).to receive(:perform_later).with(subject)
expect(RequestZencoderJob).to receive(:perform_later).with(subject)
subject.run_callbacks :create
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment