Files
fetsite/spec/models/neuigkeit_spec.rb
2015-09-09 11:03:37 +02:00

32 lines
885 B
Ruby

require 'spec_helper'
describe Neuigkeit do
let(:rubrik) {FactoryGirl.create(:rubrik)}
let(:user) {FactoryGirl.create(:user)}
[:title,:text, :rubrik_id].each do |attr|
it "should not be valid without #{attr}" do
fp = FactoryGirl.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(:neuigkeit, rubrik_id: rubrik.id, author_id: user.id))
expect(fp.save).to be true
end
it "should be valid" do
fp = FactoryGirl.build(:neuigkeit, rubrik_id: rubrik.id, author_id: user.id)
fp.should be_valid
end
pending "is parent for attachments "
pending "has questions"
pending "has nlinks"
pending "has calentries"
pending "can be an event"
pending "is published by date"
pending "has meeting"
pending "is shareable"
end