Update milestones translatable fields

Note the title field was hidden since commit 01b9aa8, even though it was
required and translatable. I've removed the required validation rule,
since it doesn't seem to make much sense and made the translatable
tests harder to write.

Also note the method `I18n.localize`, which is used to set the
milestone's title, uses `I18n.locale` even if it's inside a
`Globalize.with_locale` block, and so the same format is generated for
every locale.
This commit is contained in:
Javi Martín
2018-10-09 00:08:02 +02:00
committed by decabeza
parent d40cd3995d
commit d5bd481f7f
5 changed files with 16 additions and 14 deletions

View File

@@ -9,9 +9,9 @@ describe Budget::Investment::Milestone do
expect(milestone).to be_valid
end
it "is not valid without a title" do
it "is valid without a title" do
milestone.title = nil
expect(milestone).not_to be_valid
expect(milestone).to be_valid
end
it "is not valid without a description if status is empty" do