AutoCommit Mit Sep 9 22:03:05 CEST 2015

This commit is contained in:
Andreas Stephanides
2015-09-09 22:03:05 +02:00
parent 0da3ee8ed9
commit 1e48881830
3 changed files with 5 additions and 4 deletions

View File

@@ -4,14 +4,14 @@ describe Calentry do
it "should be valid with full data" do
e = FactoryGirl.build(:calentry)
c = FactoryGirl.create(:calendar)
e.calendars<<c
e.calendars << c
e.should be_valid
end
[:ende,:start,:typ].each do |attr|
it "should not be valid without #{attr}" do
e= FactoryGirl.build(:calentry, attr => nil)
c=FactoryGirl.create(:calendar)
e.calendars<<c
e.calendars << c
e.should_not be_valid
e.should have_at_least(1).errors_on(attr)
end