Files
fetsite/spec/models/fetprofile_spec.rb

31 lines
734 B
Ruby

require 'spec_helper'
describe Fetprofile do
[:vorname,:nachname].each do |attr|
it "should not be valid without #{attr}" do
fp = FactoryBot.build(:fetprofile)
fp.send("#{attr}=".to_sym,nil)
fp.should_not be_valid
end
end
it "should be created" do
fp=Fetprofile.new(FactoryBot.attributes_for(:fetprofile))
expect(fp.save).to be true
end
it "should be valid" do
fp = FactoryBot.build(:fetprofile)
fp.should be_valid
end
it "should not be valid with short name" do
fp = FactoryBot.build(:fetprofile)
fp.nachname ="S"
fp.should_not be_valid
fp.vorname ="d"
fp.should_not be_valid
end
pending "have memberships"
pending "be associated to gremien"
end