[#4184] Append the YAML object dump to the notes.
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
require 'pp'
|
||||||
|
|
||||||
module RedmineContracts
|
module RedmineContracts
|
||||||
|
|
||||||
# TODO: decide how this is activated.
|
# TODO: decide how this is activated.
|
||||||
@@ -63,7 +65,7 @@ module RedmineContracts
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
deliverable.notes += "Converted data:\n<pre>" + old_deliverable.pretty_inspect + "</pre>"
|
||||||
|
|
||||||
deliverable.save!
|
deliverable.save!
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -90,6 +90,14 @@ class BudgetPluginMigrationTest < ActionController::IntegrationTest
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
should "append the YAML dump of the old object to the notes" do
|
||||||
|
RedmineContracts::BudgetPluginMigration.migrate(@data)
|
||||||
|
d = Deliverable.find_by_title("Deliverable One")
|
||||||
|
|
||||||
|
assert_match /Converted data/, d.notes
|
||||||
|
assert_match /"profit"=>200.0/, d.notes
|
||||||
|
end
|
||||||
|
|
||||||
context "converting Fixed Deliverables" do
|
context "converting Fixed Deliverables" do
|
||||||
should "convert fixed_cost to total" do
|
should "convert fixed_cost to total" do
|
||||||
RedmineContracts::BudgetPluginMigration.migrate(@data)
|
RedmineContracts::BudgetPluginMigration.migrate(@data)
|
||||||
@@ -125,6 +133,7 @@ class BudgetPluginMigrationTest < ActionController::IntegrationTest
|
|||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user