diff options
author | mr <mr@mrautenberg.de> | 2011-05-23 17:09:26 +0200 |
---|---|---|
committer | mr <mr@mrautenberg.de> | 2011-05-23 17:09:26 +0200 |
commit | 9aa3fd2adadc356fbc47ba3dc1a925644b909097 (patch) | |
tree | 2b3b5989dd0bbb3f21d136b77fc4832edd29c2ee /authorization.rb | |
parent | d9d6a7e82e8f6fe0d554acf7149c81625e96bd09 (diff) | |
parent | 4482a2dd9342a081d00849d059d1f37160df078b (diff) |
Merge branch 'release/2.0.0'v2.0.0
Diffstat (limited to 'authorization.rb')
-rw-r--r-- | authorization.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/authorization.rb b/authorization.rb index 3772638..1d9b676 100644 --- a/authorization.rb +++ b/authorization.rb @@ -3,6 +3,10 @@ require "opentox-ruby" require "test/unit" TEST_URI = "http://only_a_test/test/" + rand(1000000).to_s +unless AA_SERVER #overwrite turned off A&A server for testing + AA_SERVER = "https://opensso.in-silico.ch" + @@subjectid = OpenTox::Authorization.authenticate(TEST_USER,TEST_PW) +end class TestOpenToxAuthorizationBasic < Test::Unit::TestCase @@ -40,7 +44,7 @@ class TestOpenToxAuthorizationLDAP < Test::Unit::TestCase end def test_02_list_user_groups - assert_kind_of Array, OpenTox::Authorization.list_groups(@@subjectid) + assert_kind_of Array, OpenTox::Authorization.list_user_groups(TEST_USER, @@subjectid) end def test_03_get_user @@ -60,6 +64,7 @@ class TestOpenToxAuthorizationLDAP < Test::Unit::TestCase policies.each do |policy| assert OpenTox::Authorization.delete_policy(policy, @@subjectid) end + assert_equal false, OpenTox::Authorization.uri_has_policy(TEST_URI, @@subjectid) end def test_02_check_policy_rules @@ -104,4 +109,4 @@ end def login OpenTox::Authorization.authenticate(TEST_USER,TEST_PW) -end
\ No newline at end of file +end |