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

Add step to check if the original file is still accessible

parent 3b6e4b05
Pipeline #3642517 passed with stage
in 17 minutes and 41 seconds
......@@ -14,4 +14,5 @@ Feature: Send uploaded video to zencoder
Then an encoded content should have been created
And I should receive a successful notification
And the encoded content should have been updated
And the original media file is still accessible
......@@ -4,6 +4,7 @@ end
When(/^the user creates a video content$/) do
@content = create(:video, :zencoder, user_id: @user.id)
@original_content_url = @content.video.url
end
When(/^the zencoder job finishes$/) do
......@@ -30,3 +31,10 @@ end
Then(/^the encoded content should have been updated$/) do
expect(EncodedContent.find_by(content_id: @content.id).output_id).to_not be_nil
end
Then(/^the original media file is still accessible$/) do
encoded_content = @content.encoded_contents.first
expect(@content.video.url).to eq @original_content_url
expect(@original_content_url).to_not eq(encoded_content.video.url)
expect(@content.video.hash).to_not eq(encoded_content.video.hash)
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