forked from bofh/fetsite
Added factories and spec files for Beispielsammlung
This commit is contained in:
16
spec/models/modulgruppe_spec.rb
Normal file
16
spec/models/modulgruppe_spec.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Modulgruppe do
|
||||
it "modulgruppe should not be valid without studium" do
|
||||
mg=FactoryGirl.build(:modulgruppe)
|
||||
mg.should_not be_valid
|
||||
mg.should have(1).errors_on(:studium_id)
|
||||
end
|
||||
it "modulgruppe should be valid with studium" do
|
||||
s=FactoryGirl.create(:studium)
|
||||
mg=FactoryGirl.build(:modulgruppe)
|
||||
mg.studium=s
|
||||
mg.should be_valid
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user