Skip to content
Snippets Groups Projects
Commit b3a5abe4 authored by Xurxo Méndez Pérez's avatar Xurxo Méndez Pérez
Browse files

Changed validation error message on wrong milestone dates

parent 6675bab5
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -256,7 +256,7 @@ class Milestone < ActiveRecord::Base
 
def start_date_should_be_less_than_due_date
if due_date <= start_date
errors.add(:start_date, "Can't be greater than due date")
errors.add(:due_date, "must be greater than start date")
end
end
 
Loading
Loading
---
title: Changed validation error message on wrong milestone dates
merge_request:
author: Xurxo Méndez Pérez
type: fixed
Loading
Loading
@@ -11,7 +11,7 @@ describe Milestone do
milestone = build(:milestone, start_date: Date.tomorrow, due_date: Date.yesterday)
 
expect(milestone).not_to be_valid
expect(milestone.errors[:start_date]).to include("Can't be greater than due date")
expect(milestone.errors[:due_date]).to include("must be greater than start date")
end
end
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment