An invalid /th> tag
This commit is contained in:
parent
5741261343
commit
fcfbd271fe
@ -419,14 +419,11 @@ class DmsfWorkflowsController < ApplicationController
|
||||
step = @dmsf_workflow.dmsf_workflow_steps[index]
|
||||
step.name = params[:dmsf_workflow][:step_name]
|
||||
if step.save
|
||||
s = @dmsf_workflow.dmsf_workflow_steps.find_by(step: step.step)
|
||||
if s
|
||||
@dmsf_workflow.dmsf_workflow_steps.where(step: step.step).find_each do |s|
|
||||
s.name = step.name
|
||||
unless s.save
|
||||
flash[:error] = s.errors.full_messages.to_sentence
|
||||
end
|
||||
else
|
||||
render_404
|
||||
end
|
||||
else
|
||||
flash[:error] = step.errors.full_messages.to_sentence
|
||||
|
||||
15
test/fixtures/dmsf_workflow_steps.yml
vendored
15
test/fixtures/dmsf_workflow_steps.yml
vendored
@ -1,11 +1,4 @@
|
||||
---
|
||||
wfs2:
|
||||
id: 2
|
||||
dmsf_workflow_id: 1
|
||||
step: 2
|
||||
name: '2nd step'
|
||||
user_id: 2
|
||||
operator: 1
|
||||
|
||||
wfs1:
|
||||
id: 1
|
||||
@ -15,6 +8,14 @@ wfs1:
|
||||
user_id: 1
|
||||
operator: 0
|
||||
|
||||
wfs2:
|
||||
id: 2
|
||||
dmsf_workflow_id: 1
|
||||
step: 2
|
||||
name: '2nd step'
|
||||
user_id: 2
|
||||
operator: 1
|
||||
|
||||
wfs3:
|
||||
id: 3
|
||||
dmsf_workflow_id: 1
|
||||
|
||||
@ -372,8 +372,14 @@ class DmsfWorkflowsControllerTest < RedmineDmsf::Test::TestCase
|
||||
def test_update_step_name
|
||||
put :update_step, id: @wf1.id, step: @wfs2.step, dmsf_workflow: { step_name: 'new_name'}
|
||||
assert_response :redirect
|
||||
# All steps in the same step must be renamed
|
||||
@wfs2.reload
|
||||
assert_equal 'new_name', @wfs2.name
|
||||
@wfs3.reload
|
||||
assert_equal 'new_name', @wfs3.name
|
||||
# But not in others
|
||||
@wfs1.reload
|
||||
assert_equal '1st step', @wfs1.name
|
||||
end
|
||||
|
||||
def test_update_step_operators
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user