test/test_sid.rb in win32-security-0.2.4 vs test/test_sid.rb in win32-security-0.2.5
- old
+ new
@@ -18,11 +18,11 @@
def setup
@sid = Security::SID.new(@@name)
end
test "version is set to expected value" do
- assert_equal('0.2.0', Security::SID::VERSION)
+ assert_equal('0.2.1', Security::SID::VERSION)
end
test "sid method basic functionality" do
assert_respond_to(@sid, :sid)
assert_kind_of(String, @sid.sid)
@@ -55,9 +55,14 @@
end
test "string_to_sid works as expected" do
assert_respond_to(Security::SID, :string_to_sid)
assert_kind_of(String, Security::SID.string_to_sid(@sid.to_s))
+ end
+
+ test "we can convert back and forth between a sid and a string" do
+ str = Security::SID.sid_to_string(@sid.sid)
+ assert_equal(@sid.sid, Security::SID.string_to_sid(str))
end
test "to_s works as expected" do
assert_respond_to(@sid, :to_s)
assert_kind_of(String, @sid.to_s)