test/models/error_test.rb in errdo-0.11.2 vs test/models/error_test.rb in errdo-0.11.3
- old
+ new
@@ -36,18 +36,18 @@
should "have correct relations" do
@error.error_occurrences
end
should "have counter cache for occurrences" do
- assert_difference '@error.occurrence_count', 1 do
+ assert_difference '@error.reload.occurrence_count', 1 do
@error.error_occurrences.create
end
end
should "set the last experiencer to the last occurrence's user" do
@occ1 = @error.error_occurrences.create(experiencer: users(:user))
@occ2 = @error.error_occurrences.create(experiencer: users(:user2))
- assert_equal @occ2.experiencer, @error.last_experiencer
+ assert_equal @occ2.reload.experiencer, @error.reload.last_experiencer
end
end
context "methods" do
setup do