A platform for community discussion. Free, open, simple.
DEV: Fix incorrect test.
Guo Xiang Tan8384075184c0
diff --git a/spec/models/post_spec.rb b/spec/models/post_spec.rbindex de5c367d19b..84418a6bddb 100644--- a/spec/models/post_spec.rb+++ b/spec/models/post_spec.rb@@ -139,6 +139,7 @@ describe Post dopost = Fabricate(:post, post_args)post.custom_fields["post_notice_type"] = "returning"post.custom_fields["post_notice_time"] = 1.day.ago+ post.save_custom_fieldspost}@@ -149,10 +150,8 @@ describe Post dodescribe 'recovery' doit 'deletes notices' do- post.recover!-- expect(post.custom_fields).not_to have_key("post_notice_type")- expect(post.custom_fields).not_to have_key("post_notice_time")+ expect { post.recover! }+ .to change { post.custom_fields.length }.from(2).to(0)endendend