Reset the locale after tests that may change it

This commit is contained in:
Tom Hughes 2015-03-09 00:15:05 +00:00
parent cd973c241f
commit 9f263dd9c3
2 changed files with 12 additions and 0 deletions

View file

@ -3,6 +3,14 @@ require "test_helper"
class LocaleTest < ActionDispatch::IntegrationTest
fixtures :users
def setup
I18n.locale = "en"
end
def teardown
I18n.locale = "en"
end
def test_defaulting
user = users(:second_public_user)

View file

@ -4,10 +4,14 @@ class UserCreationTest < ActionDispatch::IntegrationTest
fixtures :users
def setup
I18n.locale = "en"
OmniAuth.config.test_mode = true
end
def teardown
I18n.locale = "en"
OmniAuth.config.mock_auth[:openid] = nil
OmniAuth.config.test_mode = false
end