diff --git a/test/models/external_usergroup_test.rb b/test/models/external_usergroup_test.rb index e43f258e742..44ff9210c18 100644 --- a/test/models/external_usergroup_test.rb +++ b/test/models/external_usergroup_test.rb @@ -18,7 +18,7 @@ class ExternalUsergroupTest < ActiveSupport::TestCase test 'update_usergroups matches LDAP gids with external user groups case insensitively' do setup_ldap_stubs - @auth_source_ldap.expects(:valid_group?).with('IPAUSERS').returns(true) + @auth_source_ldap.expects(:valid_group?).with('IPAUSERS').returns(true).twice external = FactoryBot.create(:external_usergroup, :auth_source => @auth_source_ldap, :name => 'IPAUSERS') ldap_user = FactoryBot.create(:user, :login => 'JohnSmith', :mail => 'a@b.com', :auth_source => @auth_source_ldap) AuthSourceLdap.any_instance.expects(:users_in_group).with('IPAUSERS').returns(['JohnSmith']) diff --git a/test/models/host_test.rb b/test/models/host_test.rb index d3ef5f484ec..772a8be0ff2 100644 --- a/test/models/host_test.rb +++ b/test/models/host_test.rb @@ -2500,8 +2500,8 @@ def to_managed! refute_nil host.provision_interface primary = host.primary_interface - nic = FactoryBot.build_stubbed(:nic_managed, :host => host, :mac => '00:00:00:AA:BB:CC', :ip => '192.168.0.1', - :name => 'host2', :domain => host.domain) + nic = FactoryBot.build(:nic_managed, :host => host, :mac => '00:00:00:AA:BB:CC', :ip => '192.168.0.1', + :name => 'host2', :domain => host.domain) nic.primary = true nic.provision = true