Sha256: db74f2aabb3506e55abd2304797d00f400b80460303ea1967c72504b74a62bb7
Contents?: true
Size: 553 Bytes
Versions: 6
Compression:
Stored size: 553 Bytes
Contents
require 'spec_helper' describe Spree::Taxonomy, type: :model do context "#destroy" do before do @taxonomy = create(:taxonomy) @root_taxon = @taxonomy.root @child_taxon = create(:taxon, taxonomy_id: @taxonomy.id, parent: @root_taxon) end it "should destroy all associated taxons" do @taxonomy.destroy expect{ Spree::Taxon.find(@root_taxon.id) }.to raise_error(ActiveRecord::RecordNotFound) expect{ Spree::Taxon.find(@child_taxon.id) }.to raise_error(ActiveRecord::RecordNotFound) end end end
Version data entries
6 entries across 6 versions & 1 rubygems