3
3
require 'smart_proxy_realm_ad/provider'
4
4
require 'radcli'
5
5
6
- class RealmAdTest < Test :: Unit :: TestCase
6
+ class RealmAdTest < Minitest :: Test
7
7
def setup
8
8
@realm = 'test_realm'
9
9
@provider = Proxy ::AdRealm ::Provider . new (
@@ -72,7 +72,7 @@ def test_rebuild_host_returns_password
72
72
end
73
73
74
74
def test_generate_password_returns_random_passwords
75
- assert_not_equal @provider . generate_password , @provider . generate_password
75
+ refute_equal @provider . generate_password , @provider . generate_password
76
76
end
77
77
78
78
def test_generate_password_returns_20_char_long_password
@@ -81,22 +81,22 @@ def test_generate_password_returns_20_char_long_password
81
81
82
82
def test_apply_computername_prefix_should_return_false_when_prefix_is_nil
83
83
provider = Proxy ::AdRealm ::Provider . new ( computername_prefix : nil , realm : 'example.com' )
84
- assert_false provider . apply_computername_prefix? ( 'host.example.com' )
84
+ refute provider . apply_computername_prefix? ( 'host.example.com' )
85
85
end
86
86
87
87
def test_apply_computername_prefix_should_return_false_when_prefix_is_empty
88
88
provider = Proxy ::AdRealm ::Provider . new ( computername_prefix : '' , realm : 'example.com' )
89
- assert_false provider . apply_computername_prefix? ( 'host.example.com' )
89
+ refute provider . apply_computername_prefix? ( 'host.example.com' )
90
90
end
91
91
92
92
def test_apply_computername_prefix_should_return_false_when_hostname_contains_prefix
93
93
provider = Proxy ::AdRealm ::Provider . new ( computername_prefix : 'PREFIX-' , realm : 'example.com' )
94
- assert_false provider . apply_computername_prefix? ( 'prefix-host.example.com' )
94
+ refute provider . apply_computername_prefix? ( 'prefix-host.example.com' )
95
95
end
96
96
97
97
def test_apply_computername_prefix_should_return_true_when_computername_hash_is_used
98
98
provider = Proxy ::AdRealm ::Provider . new ( computername_prefix : 'PREFIX-' , computername_hash : true , realm : 'example.com' )
99
- assert_true provider . apply_computername_prefix? ( 'host.example.com' )
99
+ assert provider . apply_computername_prefix? ( 'host.example.com' )
100
100
end
101
101
102
102
def test_hostfqdn_to_computername_uses_prefix
@@ -119,7 +119,7 @@ def test_unrecognized_realm_raises_exception
119
119
end
120
120
121
121
def test_find
122
- assert_true @provider . find ( 'a_host_fqdn' )
122
+ assert @provider . find ( 'a_host_fqdn' )
123
123
end
124
124
125
125
def test_delete
0 commit comments