Upgraded to Rails 4

This commit is contained in:
2019-02-24 15:47:27 +01:00
parent f52ec0411d
commit f809f36c06
86 changed files with 732 additions and 662 deletions

View File

@@ -3,22 +3,22 @@ require 'spec_helper'
describe Fetprofile do
[:vorname,:nachname].each do |attr|
it "should not be valid without #{attr}" do
fp = FactoryGirl.build(:fetprofile)
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(FactoryGirl.attributes_for(:fetprofile))
fp=Fetprofile.new(FactoryBot.attributes_for(:fetprofile))
expect(fp.save).to be true
end
it "should be valid" do
fp = FactoryGirl.build(:fetprofile)
fp = FactoryBot.build(:fetprofile)
fp.should be_valid
end
it "should not be valid with short name" do
fp = FactoryGirl.build(:fetprofile)
fp = FactoryBot.build(:fetprofile)
fp.nachname ="S"
fp.should_not be_valid
fp.vorname ="d"