Added test_create_binding_target
Goals (incl. binding) are required to have targets Plugin fixtures are available through accessors
This commit is contained in:
@@ -8,7 +8,8 @@ class Goal < ActiveRecord::Base
|
||||
|
||||
validates :target_exposures, presence: true
|
||||
validates :is_binding, uniqueness: {scope: :project_id}, if: :is_binding?
|
||||
validates :name, presence: true, uniqueness: {scope: :project_id}
|
||||
validates :name, presence: true, uniqueness: {scope: :project_id},
|
||||
exclusion: {in: [I18n.t('targets.form.binding_goal')], unless: :is_binding?}
|
||||
|
||||
after_initialize do
|
||||
if new_record?
|
||||
|
||||
Reference in New Issue
Block a user