File: test_supported_control.rb

package info (click to toggle)
ruby-activeldap 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 1,588 kB
  • sloc: ruby: 18,143; sh: 12; makefile: 5
file content (23 lines) | stat: -rw-r--r-- 522 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# -*- coding: utf-8 -*-

require 'al-test-utils'

class TestSupportedControl < Test::Unit::TestCase
  def supported_control(controls)
    ActiveLdap::SupportedControl.new(controls)
  end

  class TestPagedResults < self
    def paged_results?(controls)
      supported_control(controls).paged_results?
    end

    def test_true
      assert_true(paged_results?(ActiveLdap::LdapControls::PAGED_RESULTS))
    end

    def test_false
      assert_false(paged_results?(ActiveLdap::LdapControls::ASSERTION))
    end
  end
end