A platform for community discussion. Free, open, simple.
FIX: change around to after in flag spec (#27168)
Krzysztof Kotlarek99e27c4fd5ce
diff --git a/spec/models/flag_spec.rb b/spec/models/flag_spec.rbindex ff26f05d474..1f40c7d3e5e 100644--- a/spec/models/flag_spec.rb+++ b/spec/models/flag_spec.rb@@ -1,21 +1,19 @@# frozen_string_literal: trueRSpec.describe Flag, type: :model do- around do |test|- Flag.reset_flag_settings!- test.call- Flag.reset_flag_settings!- end+ after(:each) { Flag.reset_flag_settings! }it "has id lower than 1000 for system flags" doflag = Fabricate(:flag, id: 1)expect(flag.system?).to be true+ flag.destroy!endit "has id greater than 1000 for non-system flags" doflag = Fabricate(:flag)expect(flag.system?).to be falseexpect(flag.id).to be > 1000+ flag.destroy!endit "has correct name key" do@@ -27,6 +25,8 @@ RSpec.describe Flag, type: :model doflag.update!(name: "THIS IS SPaM!+)(*&^%$#@@@!)")expect(flag.name_key).to eq("this_is_spam")++ flag.destroy!endit "updates post action types when created, modified or destroyed" do