mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 03:10:46 -06:00
DEV: Fix incorrect test.
This commit is contained in:
parent
9d0698e2a8
commit
8384075184
@ -139,6 +139,7 @@ describe Post do
|
||||
post = Fabricate(:post, post_args)
|
||||
post.custom_fields["post_notice_type"] = "returning"
|
||||
post.custom_fields["post_notice_time"] = 1.day.ago
|
||||
post.save_custom_fields
|
||||
post
|
||||
}
|
||||
|
||||
@ -149,10 +150,8 @@ describe Post do
|
||||
|
||||
describe 'recovery' do
|
||||
it '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)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user