Modul sollte keine Abhängigkeit von Modulgruppe haben

This commit is contained in:
Thomas Blazek
2013-08-05 11:12:07 +02:00
parent eb2f14f18b
commit 15a9b4fbe7
3 changed files with 15 additions and 2 deletions

View File

@@ -1,5 +1,14 @@
require 'spec_helper'
describe Modul do
pending "add some examples to (or delete) #{__FILE__}"
it "should not be valid without name" do
m = FactoryGirl.build(:modul)
m.should_not be_valid
m.should have(1).errors_on(:name)
end
it "should be valid with name" do
m = FactoryGirl.build(:modul)
m.name = "Grundlagen"
m.should be_valid
end
end