Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2012-08-29 19:36:02 +0400
committerRobert Speicher <rspeicher@gmail.com>2012-08-29 19:36:02 +0400
commit97423a0bed1148f65f9ed2bd8bf540e764d9576c (patch)
treed91a67a6a863a97b8cf2acd76b01c18de08c2dc5 /spec/models/issue_spec.rb
parent2bdea8651fa3bd82418986ada84828c22d451405 (diff)
Add more coverage for model validations and associations
Diffstat (limited to 'spec/models/issue_spec.rb')
-rw-r--r--spec/models/issue_spec.rb12
1 files changed, 1 insertions, 11 deletions
diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb
index 5c22d0ccbcc..69829a4d13d 100644
--- a/spec/models/issue_spec.rb
+++ b/spec/models/issue_spec.rb
@@ -2,21 +2,11 @@ require 'spec_helper'
describe Issue do
describe "Associations" do
- it { should belong_to(:project) }
- it { should belong_to(:author) }
- it { should belong_to(:assignee) }
it { should belong_to(:milestone) }
end
describe "Validation" do
- it { should validate_presence_of(:title) }
- it { should validate_presence_of(:author_id) }
- it { should validate_presence_of(:project_id) }
- end
-
- describe "Scope" do
- it { Issue.should respond_to :closed }
- it { Issue.should respond_to :opened }
+ it { should ensure_length_of(:description).is_within(0..2000) }
end
describe 'modules' do