Sha256: 63ec36fbdece3c6599b664de8dc85a2bef2f50e41f5dc430157b2bd125bfa025
Contents?: true
Size: 559 Bytes
Versions: 11
Compression:
Stored size: 559 Bytes
Contents
require 'rails_helper' RSpec.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
11 entries across 11 versions & 1 rubygems