mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-30 10:58:31 -05:00
18 lines
312 B
Ruby
18 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
|
|
|