Sha256: eda80241dbb1748c90df1d7c245c7cc72e44694e96a218953cec85bff1f9a2dd
Contents?: true
Size: 499 Bytes
Versions: 8
Compression:
Stored size: 499 Bytes
Contents
require 'spec_helper' module Fooltip describe Popup do it { should have_many(:links) } it { should have_many(:containers).through(:links) } it { should validate_presence_of(:identifier) } it "should destroy all associated links when destroyed" do p = FactoryGirl.create(:popup, title: 'Test Popup') c = FactoryGirl.create(:container) FactoryGirl.create(:link, container: c, popup: p) -> { p.destroy }.should change(Link, :count).by(-1) end end end
Version data entries
8 entries across 8 versions & 1 rubygems