cschiewek / devise_ldap_authenticatable

Devise Module for LDAP
MIT License
593 stars 359 forks source link

Tests failing when checking out from master #201

Open gaqzi opened 9 years ago

gaqzi commented 9 years ago

I just checked out from master and got these errors when running the test suite:

Failures:

  1) Users With default settings change a LDAP password should change password
     Failure/Error: @user.change_password!("secret")
     NoMethodError:
       undefined method `ldap_auth_password_builder' for Devise:Module
     # ./lib/devise_ldap_authenticatable/ldap/adapter.rb:29:in `update_own_password'
     # ./lib/devise_ldap_authenticatable/model.rb:28:in `change_password!'
     # ./spec/unit/user_spec.rb:50:in `block (4 levels) in <top (required)>'

  2) Users With default settings check group membership w/out admin bind should return true for user being in the users group
     Failure/Error: ::Devise.ldap_check_group_membership_without_admin = true
     NoMethodError:
       undefined method `ldap_check_group_membership_without_admin=' for Devise:Module
     # ./spec/unit/user_spec.rb:176:in `block (4 levels) in <top (required)>'

  3) Users With default settings check group membership w/out admin bind should return false for user being in the admins group
     Failure/Error: ::Devise.ldap_check_group_membership_without_admin = true
     NoMethodError:
       undefined method `ldap_check_group_membership_without_admin=' for Devise:Module
     # ./spec/unit/user_spec.rb:176:in `block (4 levels) in <top (required)>'

  4) Users With default settings check group membership w/out admin bind should return false for a user being in a nonexistent group
     Failure/Error: ::Devise.ldap_check_group_membership_without_admin = true
     NoMethodError:
       undefined method `ldap_check_group_membership_without_admin=' for Devise:Module
     # ./spec/unit/user_spec.rb:176:in `block (4 levels) in <top (required)>'

I went through and it seems all of this goes back to PR #165 where ldap_check_group_membership_without_admin and ldap_auth_password_builder were removed.

From what I gather both of these attributes does become obsolete given that commit, but there are still tests around that depends on this functionality. And the documentation refers to these attributes.

Is the functionality that were backed by these options no longer valid? In which case the backing tests ought to be removed together with the documentation mentioning them.

I can take it up on myself to deal with this if I just know how it's supposed to be handled. :)

Dangeranger commented 9 years ago

:+1: Getting this as well

justinIs commented 8 years ago

Any update to this? Tests are still failing