forked from bofh/fetsite
AutoCommit Sam Sep 5 21:03:02 CEST 2015
This commit is contained in:
@@ -25,15 +25,16 @@ describe Gremium do
|
||||
expect(Gremium.tabs).to eq([])
|
||||
end
|
||||
it "destroys memberships if its destroyed" do
|
||||
g=FactoryGirl.create(:gremium_with_fetprofile)
|
||||
expect(Membership.count).to be(1)
|
||||
g.delete
|
||||
expect(Membership.count).to be(0)
|
||||
g=FactoryGirl.create(:gremium)
|
||||
fp=FactoryGirl.create(:fetprofile)
|
||||
m=FactoryGirl.create(:membership, gremium_id: g.id, fetprofile_id: fp.id)
|
||||
expect{g.destroy}.to change {Membership.count}.by(-1)
|
||||
|
||||
|
||||
end
|
||||
|
||||
it "responds to title" do
|
||||
g=FactoryGirl.build(:gremium)
|
||||
expect(g.responds_to?(:title)).to be true
|
||||
expect(g.respond_to?(:title)).to be true
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user