forked from bofh/fetsite
AutoCommit Mit Sep 9 11:03:36 CEST 2015
This commit is contained in:
31
spec/models/neuigkeit_spec.rb
Normal file
31
spec/models/neuigkeit_spec.rb
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
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
|
||||||
Reference in New Issue
Block a user