mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-02-17 04:01:29 -05:00
spec for trashable
This commit is contained in:
parent
809594c00a
commit
85389e8b86
1 changed files with 18 additions and 0 deletions
18
spec/components/trashable_spec.rb
Normal file
18
spec/components/trashable_spec.rb
Normal file
|
@ -0,0 +1,18 @@
|
|||
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
|
||||
|
Loading…
Reference in a new issue