Skip to content

Commit

Permalink
This test was passing incorrectly
Browse files Browse the repository at this point in the history
with_model will happily respond to everything
  • Loading branch information
robotdana committed Nov 4, 2019
1 parent cd808d1 commit 033efbf
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions spec/discard/model_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -451,9 +451,16 @@
2.times { user1.comments.create! }

user1.comments.discard_all

expect(user1.comments).to all(be_discarded)
expect(user2.comments).to all(be_undiscarded)
user1.comments.each do |comment|
expect(comment).to be_discarded
expect(comment).to_not be_undiscarded
expect(comment).to_not be_kept
end
user2.comments.each do |comment|
expect(comment).to_not be_discarded
expect(comment).to be_undiscarded
expect(comment).to be_kept
end
end
end
end
Expand Down

0 comments on commit 033efbf

Please sign in to comment.