This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/spec/components/trashable_spec.rb
2013-07-26 14:41:58 +10:00

19 lines
312 B
Ruby

require 'spec_helper'
require_dependency 'trashable'
describe Trashable do
# post is trashable, just use it.
it "works correctly" do
p1 = Fabricate(:post)
p2 = Fabricate(:post)
Post.count.should == 2
p1.trash!
Post.count.should == 1
Post.with_deleted.count.should == 2
end
end