def test_defaulting
user = create(:user, :languages => [])
+ get "/login"
+ follow_redirect!
post "/login", :params => { :username => user.email, :password => "test" }
follow_redirect!
get "/diary", :params => { :locale => "es" }
assert_select "html[lang=?]", "es"
+ get "/login"
+ follow_redirect!
post "/login", :params => { :username => user.email, :password => "test" }
follow_redirect!