Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions spec/after_commit_everywhere_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
end
expect(handler).to have_received(:call).with(:de)
ensure
I18n.enforce_available_locales = true
I18n.enforce_available_locales = old_enforce_available_locales
end
end

Expand Down Expand Up @@ -307,6 +307,7 @@
end

it "preserves the locale" do
old_enforce_available_locales = I18n.enforce_available_locales
I18n.enforce_available_locales = false

ActiveRecord::Base.transaction do
Expand All @@ -315,8 +316,8 @@
expect(handler).not_to have_received(:call)
end
expect(handler).to have_received(:call).with(:de)

I18n.enforce_available_locales = true
ensure
I18n.enforce_available_locales = old_enforce_available_locales
end
end

Expand Down