Sha256: 73e6de3860a455a37abe210901b19c1637e07dbd90f1a7aafc5cb4a47df1a3d4

Contents?: true

Size: 339 Bytes

Versions: 1

Compression:

Stored size: 339 Bytes

Contents

require 'spec_helper'

describe Forem::Post do
  let(:post) { create_post! }
  let(:reply) { create_post!(:reply_to => post) }
  
  context "upon deletion" do

    it "clears the reply_to_id for all replies" do
      reply.reply_to.should eql(post)
      post.destroy
      reply.reload
      reply.reply_to.should be_nil
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
forem-0.0.1 spec/models/post_spec.rb