diff options
author | rautenberg <rautenberg@in-silico.ch> | 2012-03-22 09:56:57 +0100 |
---|---|---|
committer | rautenberg <rautenberg@in-silico.ch> | 2012-03-22 09:56:57 +0100 |
commit | e7d213bfbe7ae07e5935a62b2ec0d5eee6318711 (patch) | |
tree | c8c099d9409f6bc309ca7eea3a29de94b00b5f30 | |
parent | 4186a196491e9c4f95b5a7b7ed8df3657b2e20f3 (diff) |
fix AA tests to new AA version
-rw-r--r-- | test/authorization.rb | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/test/authorization.rb b/test/authorization.rb index ffb2d65..e446ff7 100644 --- a/test/authorization.rb +++ b/test/authorization.rb @@ -2,12 +2,10 @@ require 'test/unit' $LOAD_PATH << File.join(File.dirname(__FILE__),'..','lib') require File.expand_path(File.join(File.dirname(__FILE__),'..','lib','opentox-client.rb')) TEST_URI = "http://only_a_test/test/" + rand(1000000).to_s -#AA = "https://opensso.in-silico.ch" +AA ||= "https://opensso.in-silico.ch" AA_USER = "guest" AA_PASS = "guest" -#unless defined? AA #overwrite turned off A&A server for testing - @@subjectid = OpenTox::Authorization.authenticate(AA_USER,AA_PASS) -#end +@@subjectid = OpenTox::Authorization.authenticate(AA_USER,AA_PASS) class TestOpenToxAuthorizationBasic < Test::Unit::TestCase @@ -27,8 +25,9 @@ class TestOpenToxAuthorizationBasic < Test::Unit::TestCase end def test_04_logout - tok = login - assert logout(tok) + tok = login + assert logout(tok) + assert_equal false, OpenTox::Authorization.is_token_valid(tok) end def test_05_list_policies @@ -39,15 +38,11 @@ end class TestOpenToxAuthorizationLDAP < Test::Unit::TestCase - def test_01_list_groups - assert_kind_of Array, OpenTox::Authorization.list_groups(@@subjectid) - end - - def test_02_list_user_groups + def test_01_list_user_groups assert_kind_of Array, OpenTox::Authorization.list_user_groups(AA_USER, @@subjectid) end - def test_03_get_user + def test_02_get_user assert_equal AA_USER, OpenTox::Authorization.get_user(@@subjectid) end |