diff options
author | Nihad Abbasov <narkoz.2008@gmail.com> | 2012-09-05 03:14:24 -0700 |
---|---|---|
committer | Nihad Abbasov <narkoz.2008@gmail.com> | 2012-09-05 04:01:11 -0700 |
commit | 0b559cdece743269a7087c8206ab2cc587ec15f2 (patch) | |
tree | 4e3892e6c80a9c72a4a23ba561770d338d939cfe /spec/models/milestone_spec.rb | |
parent | 2680371785bfac1d0b76e5c4e53aa1074f743f84 (diff) | |
download | gitlab-ce-0b559cdece743269a7087c8206ab2cc587ec15f2.tar.gz |
add validations for boolean attributes
Diffstat (limited to 'spec/models/milestone_spec.rb')
-rw-r--r-- | spec/models/milestone_spec.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/models/milestone_spec.rb b/spec/models/milestone_spec.rb index fa15fc8f560..f0f0f88303f 100644 --- a/spec/models/milestone_spec.rb +++ b/spec/models/milestone_spec.rb @@ -9,6 +9,7 @@ describe Milestone do describe "Validation" do it { should validate_presence_of(:title) } it { should validate_presence_of(:project_id) } + it { should ensure_inclusion_of(:closed).in_array([true, false]) } end let(:milestone) { Factory :milestone } |