Project

General

Profile

Defect #35135 » 35135-test.diff

Go MAEDA, 2021-04-21 07:37

View differences:

test/unit/auth_source_ldap_test.rb (作業コピー)
82 82
    assert a.valid?
83 83
  end
84 84

  
85
  def test_get_attr
86
    attr = {
87
      'firstname' => 'John',
88
      'lastname' => 'Smith',
89
      'mail' => %w[jsmith@example.com jsmith@example.net]
90
    }
91

  
92
    assert_equal '', AuthSourceLdap.get_attr(attr, 'invalid_attr_name')
93
    assert_equal 'Smith', AuthSourceLdap.get_attr(attr, 'lastname')
94
    assert_equal 'jsmith@example.com', AuthSourceLdap.get_attr(attr, 'mail')
95
  end
96

  
85 97
  test 'ldap_mode setter sets tls and verify_peer' do
86 98
    a = AuthSourceLdap.new
87 99

  
    (1-1/1)