diff --git a/spec/services/reorder_flag_spec.rb b/spec/services/reorder_flag_spec.rb index 4351f62ed57..1c6c5e21fec 100644 --- a/spec/services/reorder_flag_spec.rb +++ b/spec/services/reorder_flag_spec.rb @@ -31,6 +31,10 @@ RSpec.describe(ReorderFlag) do context "when user is allowed to perform the action" do fab!(:current_user) { Fabricate(:admin) } + after do + described_class.call(flag_id: flag.id, guardian: current_user.guardian, direction: "down") + end + it "sets the service result as successful" do expect(result).to be_a_success end diff --git a/spec/services/toggle_flag_spec.rb b/spec/services/toggle_flag_spec.rb index 2af4c4b5a9f..4f1ad543872 100644 --- a/spec/services/toggle_flag_spec.rb +++ b/spec/services/toggle_flag_spec.rb @@ -14,6 +14,8 @@ RSpec.describe(ToggleFlag) do context "when user is allowed to perform the action" do fab!(:current_user) { Fabricate(:admin) } + after { flag.update!(enabled: true) } + it "sets the service result as successful" do expect(result).to be_a_success end diff --git a/spec/system/admin_flags_spec.rb b/spec/system/admin_flags_spec.rb index 4098fa4f167..a525b2b8742 100644 --- a/spec/system/admin_flags_spec.rb +++ b/spec/system/admin_flags_spec.rb @@ -25,6 +25,8 @@ describe "Admin Flags Page", type: :system do expect(all(".flag-action-type-details strong").map(&:text)).to eq( ["Something Else", "It's Inappropriate", "It's Illegal"], ) + + Flag.system.where(name: "spam").update!(enabled: true) end it "allows admin to change order of flags" do