[#4177] Requiring executed isn't letting it be saved as false.
This commit is contained in:
1 parent
f4a2b39ba2
commit
5960a4359a
2 files changed
-2
No files matched your search
@@ -12,7 +12,6 @@ class Contract < ActiveRecord::Base
|
|||||||
validates_presence_of :project
|
validates_presence_of :project
|
||||||
validates_presence_of :start_date
|
validates_presence_of :start_date
|
||||||
validates_presence_of :end_date
|
validates_presence_of :end_date
|
||||||
validates_presence_of :executed
|
|
||||||
validates_inclusion_of :discount_type, :in => %w($ %), :allow_blank => true, :allow_nil => true
|
validates_inclusion_of :discount_type, :in => %w($ %), :allow_blank => true, :allow_nil => true
|
||||||
validate :start_and_end_date_are_valid
|
validate :start_and_end_date_are_valid
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ class ContractTest < ActiveSupport::TestCase
|
|||||||
should_validate_presence_of :project
|
should_validate_presence_of :project
|
||||||
should_validate_presence_of :start_date
|
should_validate_presence_of :start_date
|
||||||
should_validate_presence_of :end_date
|
should_validate_presence_of :end_date
|
||||||
should_validate_presence_of :executed
|
|
||||||
|
|
||||||
should_not_allow_mass_assignment_of :project_id, :project, :discount_type
|
should_not_allow_mass_assignment_of :project_id, :project, :discount_type
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user