mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-31 20:19:05 +08:00
Specs for workflow_image_fenerator
fix SCI-2924
This commit is contained in:
parent
d738169120
commit
b41dc0a4d5
1 changed files with 16 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue