Files
fetsite/spec/models/thema_spec.rb

22 lines
453 B
Ruby

require 'spec_helper'
describe Thema do
[:text, :title].each do |attr|
it "should not be valid without #{attr}" do
tg=FactoryBot.build(:themengruppe)
t = FactoryBot.build(:thema, attr=>nil)
t.themengruppe=tg
t.should_not be_valid
end
end
it "should not be valid without Themengruppe" do
tg=FactoryBot.build(:themengruppe)
t = FactoryBot.build(:thema)
t.should_not be_valid
end
end