Specs for workflow_image_fenerator

fix SCI-2924
This commit is contained in:
Urban Rotnik 2019-01-09 18:48:09 +01:00
parent d738169120
commit b41dc0a4d5

View file

@ -3,4 +3,20 @@
require 'rails_helper' require 'rails_helper'
describe WorkflowImageGenerator do describe WorkflowImageGenerator do
let(:experiment) { create :experiment_with_tasks }
let(:params) { { experiment_id: experiment.id } }
context 'when succeed' do
it 'succeed? returns true' do
expect(described_class.execute(params).succeed?).to be_truthy
end
it 'worklfow image of experiment is updated' do
old_filename = experiment.workflowimg_file_name
described_class.execute(params)
experiment.reload
expect(experiment.workflowimg_file_name).not_to be == old_filename
end
end
end end