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