Project

General

Profile

« Previous | Next » 

Revision 08705e43

Added by Dominic Cleal over 7 years ago

fixes #18238 - use fixed model name in test expectation

View differences:

test/models/auth_sources/auth_source_ldap_test.rb
end
test 'update_usergroups refreshes on all external user groups, in LDAP and in Foreman auth source' do
@auth_source_ldap.expects(:valid_group?).with('external_usergroup1').returns(true)
external = FactoryGirl.create(:external_usergroup, :auth_source => @auth_source_ldap)
@auth_source_ldap.expects(:valid_group?).with('new external group').returns(true)
external = FactoryGirl.create(:external_usergroup, :name => 'new external group', :auth_source => @auth_source_ldap)
User.any_instance.expects(:external_usergroups).returns([external])
@auth_source_ldap.send(:update_usergroups, 'test')
end

Also available in: Unified diff