Approval workflow step name #629
This commit is contained in:
parent
bd8a9dc095
commit
c94bcffdd8
@ -31,13 +31,15 @@ class DmsfWorkflowStepTest < RedmineDmsf::Test::UnitTest
|
||||
@wfs2 = DmsfWorkflowStep.find(2)
|
||||
@wfs5 = DmsfWorkflowStep.find(5)
|
||||
@revision1 = DmsfFileRevision.find_by_id 1
|
||||
@wf2 = DmsfWorkflow.find(2)
|
||||
end
|
||||
|
||||
def test_truth
|
||||
assert_kind_of DmsfWorkflowStep, @wfs1
|
||||
assert_kind_of DmsfWorkflowStep, @wfs2
|
||||
assert_kind_of DmsfWorkflowStep, @wfs5
|
||||
assert_kind_of DmsfFileRevision, @revision1
|
||||
assert_kind_of DmsfFileRevision, @revision1
|
||||
assert_kind_of DmsfWorkflow, @wf2
|
||||
end
|
||||
|
||||
def test_create
|
||||
@ -124,5 +126,14 @@ class DmsfWorkflowStepTest < RedmineDmsf::Test::UnitTest
|
||||
:dmsf_workflow_step_id => @wfs5.id,
|
||||
:dmsf_file_revision_id => @revision1.id).first
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def test_copy_to
|
||||
wfs = @wfs1.copy_to(@wf2);
|
||||
assert_equal wfs.dmsf_workflow_id, @wf2.id
|
||||
assert_equal wfs.step, @wfs1.step
|
||||
assert_equal wfs.name, @wfs1.name
|
||||
assert_equal wfs.user_id, @wfs1.user_id
|
||||
assert_equal wfs.operator, @wfs1.operator
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@ -234,5 +234,11 @@ class DmsfWorkflowTest < RedmineDmsf::Test::UnitTest
|
||||
def test_scope_status
|
||||
assert_equal 1, DmsfWorkflow.status(DmsfWorkflow::STATUS_LOCKED).count
|
||||
end
|
||||
|
||||
def test_copy_to
|
||||
wf = @wf1.copy_to(@project5, "#{@wf1.name}_copy")
|
||||
assert_equal wf.project_id, @project5.id
|
||||
assert_equal wf.name, "#{@wf1.name}_copy"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user