Calendar Klasse überarbeitet Views,gefixt, Pictures hinzugefügt

This commit is contained in:
Andreas Stephanides
2013-08-11 01:17:37 +02:00
parent 116446ff63
commit a5a02e065a
17 changed files with 238 additions and 67 deletions

View File

@@ -1,5 +1,20 @@
require 'spec_helper'
describe Calentry do
pending "add some examples to (or delete) #{__FILE__}"
it "should be valid with full data" do
e = FactoryGirl.build(:calentry)
c = FactoryGirl.create(:calendar)
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.should_not be_valid
e.should have_at_least(1).errors_on(attr)
end
end
end