Fixed broken Digital#destroy spec

This commit is contained in:
Michael Bianco
2012-10-29 10:53:08 -04:00
parent d23462fadb
commit 6f2ad538a1
2 changed files with 8 additions and 9 deletions
+7 -8
View File
@@ -12,14 +12,13 @@ describe Spree::Digital do
end
context "#destroy" do
#it "should destroy associated digital_links" do
# digital = FactoryGirl.create(:digital)
# 3.times { digital.digital_links.create! :order => FactoryGirl.create(:order) }
# DigitalLink.count.should == 3
# digital.destroy
# DigitalLink.count.should == 0
#end
it "should destroy associated digital_links" do
digital = FactoryGirl.create(:digital)
3.times { digital.digital_links.create! }
Spree::DigitalLink.count.should == 3
digital.destroy
Spree::DigitalLink.count.should == 0
end
end
end