aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2014-12-01 14:54:39 +0000
committerLouise Crow <louise.crow@gmail.com>2014-12-01 14:54:39 +0000
commit20346a03fee865f9213c65e80bac7b7a8dfb1837 (patch)
treef4c60fa96a8d8d04e0a0ca58ec90eaff98e87e49 /spec
parent4828727896b8bf397bbcd2716e2d862e28dffe69 (diff)
parentd40aa95b320ded8f43231490acb11f109cbe7985 (diff)
Merge branch '2000-validate-category-description' into rails-3-develop
Diffstat (limited to 'spec')
-rw-r--r--spec/models/public_body_category_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/models/public_body_category_spec.rb b/spec/models/public_body_category_spec.rb
index 2d39a7376..c185a3169 100644
--- a/spec/models/public_body_category_spec.rb
+++ b/spec/models/public_body_category_spec.rb
@@ -61,5 +61,11 @@ describe PublicBodyCategory do
existing = FactoryGirl.create(:public_body_category)
PublicBodyCategory.new(:email => existing.category_tag).should_not be_valid
end
+
+ it 'should require a description' do
+ category = PublicBodyCategory.new
+ category.should_not be_valid
+ category.errors[:description].should == ["Description can't be blank"]
+ end
end
end