Commit 2fc77cbe1e1c9aa4724768456392f495d212dcbc

Authored by Robert Lail
1 parent 13c8b21f
Exists in master and in 1 other branch production

add a spec asserting that resolving a problem doesn't reset its notice count

Showing 1 changed file with 9 additions and 0 deletions   Show diff stats
spec/models/problem_spec.rb
... ... @@ -109,6 +109,15 @@ describe Problem do
109 109 problem.resolved_at.to_s.should == expected_resolved_at.to_s
110 110 end
111 111  
  112 + it "should not reset notice count" do
  113 + problem = Fabricate(:problem, :notices_count => 1)
  114 + original_notices_count = problem.notices_count
  115 + original_notices_count.should > 0
  116 +
  117 + problem.resolve!
  118 + problem.notices_count.should == original_notices_count
  119 + end
  120 +
112 121 it "should throw an err if it's not successful" do
113 122 problem = Fabricate(:problem)
114 123 problem.should_not be_resolved
... ...