DEV: Fix new features notification flakey specs (#19596)

This commit is contained in:
Osama Sayegh 2022-12-23 06:17:42 +03:00 committed by GitHub
parent c2a733a95a
commit 18467d4067
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -75,7 +75,7 @@ RSpec.describe Jobs::CheckNewFeatures do
expect(DiscourseUpdates.get_last_viewed_feature_date(admin1.id).iso8601).to eq(Time.zone.now.iso8601)
end
xit "notifies admins about new features that are available in the site's version" do
it "notifies admins about new features that are available in the site's version" do
Notification.destroy_all
described_class.new.execute({})
@ -90,7 +90,7 @@ RSpec.describe Jobs::CheckNewFeatures do
).count).to eq(1)
end
xit "consolidates new features notifications" do
it "consolidates new features notifications" do
Notification.destroy_all
described_class.new.execute({})

View File

@ -154,6 +154,10 @@ RSpec.describe DiscourseUpdates do
Discourse.redis.set('new_features', MultiJson.dump(sample_features))
end
after do
Discourse.redis.del('new_features')
end
it 'returns all items on the first run' do
result = DiscourseUpdates.new_features