Skip to content

Commit

Permalink
chore: fix actions test
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul-Bob committed Nov 24, 2023
1 parent d8c0532 commit 00c0539
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions spec/system/avo/actions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@

describe "redirects when no confirmation" do
it "redirects to hey page" do
no_confirmation = Sub::DummyAction.no_confirmation
original_dummy_action = Sub::DummyAction.dup

Sub::DummyAction.class_eval do
self.no_confirmation = true
Expand All @@ -152,12 +152,8 @@

expect(page).to have_text "hey en"


Sub::DummyAction.class_eval do
undef_method :redirect_handle
end

Sub::DummyAction.no_confirmation = no_confirmation
Sub.send(:remove_const, "DummyAction")
Sub.const_set("DummyAction", original_dummy_action)
end
end
# let!(:roles) { { admin: false, manager: false, writer: false } }
Expand Down

0 comments on commit 00c0539

Please sign in to comment.