A platform for community discussion. Free, open, simple.
DEV: Fix new features notification flakey specs (#19596)
Osama Sayegh18467d406748
diff --git a/spec/jobs/check_new_features_spec.rb b/spec/jobs/check_new_features_spec.rbindex 8a806fef105..0c1c9f2058d 100644--- a/spec/jobs/check_new_features_spec.rb+++ b/spec/jobs/check_new_features_spec.rb@@ -75,7 +75,7 @@ RSpec.describe Jobs::CheckNewFeatures doexpect(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" doNotification.destroy_alldescribed_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" doNotification.destroy_alldescribed_class.new.execute({})diff --git a/spec/lib/discourse_updates_spec.rb b/spec/lib/discourse_updates_spec.rbindex dfc65daffd0..9ea6b9f07f4 100644--- a/spec/lib/discourse_updates_spec.rb+++ b/spec/lib/discourse_updates_spec.rb@@ -154,6 +154,10 @@ RSpec.describe DiscourseUpdates doDiscourse.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' doresult = DiscourseUpdates.new_features