DonutWorks / Ari

0 stars 0 forks source link

undefined method `to_hash' for nil:NilClass #276

Closed shaynekang closed 9 years ago

shaynekang commented 9 years ago

테스트가 실패하네요~

Failures:

  1) kakao auth process lets me fail to kakao log in
     Failure/Error: find("#login-form a").click
     NoMethodError:
       undefined method `to_hash' for nil:NilClass
     # ./app/controllers/providers_controller.rb:22:in `failure'
     # ./config/initializers/omniauth.rb:10:in `call'
     # ./config/initializers/omniauth.rb:10:in `block in <top (required)>'
     # ./spec/acceptance/kakao_auth_spec.rb:20:in `block (2 levels) in <top (required)>'

Finished in 10.36 seconds (files took 6.4 seconds to load)
79 examples, 1 failure

Failed examples:

rspec ./spec/acceptance/kakao_auth_spec.rb:17 # kakao auth process lets me fail to kakao log in

[2014-10-13T01:46:48.093460 #23602] ERROR -- omniauth: (kakao) Authentication failure! invalid_credentials encountered. 라는 메시지가 나면서 실패합니다. 카카오 인증이 실패할 경우를 테스트하는 부분에서 에러가 나는 것 같네요.

저만 테스트가 실패하는 걸까요. 다른 분들은 어떠신가요?

shaynekang commented 9 years ago

테스트 확인 부탁드립니다~ @MujinChae @yhoonkim @minhyeok92 @FeGs

angdev commented 9 years ago

이 부분은 #274 에서 고쳐졌습니다.

실패하는 시나리오의 경우에는 ProvidersController#failure 의 다음 부분에서

params.merge!(request.env['omniauth.params'])

request.env['omniauth.params'] 값이 들어있지 않기 때문에 테스트가 실패하더라구요.

shaynekang commented 9 years ago

아항 그렇군요. 확인했습니다! 이슈는 닫도록 하겠습니다. 수고하셨습니다~