Add proposal translations

Adapt retire form to include needed translations and move validations
from controller to model.

Also change sanitizable concern to sanitize not marked for destruction
translations.
This commit is contained in:
Senén Rodero Rodríguez
2018-12-22 23:35:32 +01:00
committed by voodoorai2000
parent 5343448c5a
commit 02be0c61f9
10 changed files with 137 additions and 31 deletions

View File

@@ -146,7 +146,9 @@ describe ProposalNotification do
it "returns false if the resource is retired" do
notification = create(:notification, notifiable: notifiable)
notifiable.proposal.update(retired_at: Time.current)
notifiable.proposal.update(retired_at: Time.current,
retired_explanation: "Unfeasible reason explanation",
retired_reason: "unfeasible")
expect(notification.check_availability(proposal)).to be(false)
end