diff options
author | rautenberg <rautenberg@in-silico.ch> | 2013-07-25 09:38:35 +0200 |
---|---|---|
committer | rautenberg <rautenberg@in-silico.ch> | 2013-07-25 09:38:35 +0200 |
commit | fad1d4b322958e1c64837bf9311afc7f59ca0871 (patch) | |
tree | 5b31d10ab5e086d45279135df928d63e8910499d | |
parent | 7522e0389ea7f36fc81dc4e6e36425449854209b (diff) |
set OpenTox::ReatClientWrapper.subjectid in setup
-rw-r--r-- | test/setup.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/setup.rb b/test/setup.rb index a90ed66..901c70a 100644 --- a/test/setup.rb +++ b/test/setup.rb @@ -8,8 +8,6 @@ TEST_DIR ||= File.expand_path(File.dirname(__FILE__)) DATA_DIR ||= File.join(TEST_DIR,"data") unless $aa[:uri].to_s == "" - $pi[:subjectid] = OpenTox::Authorization.authenticate($pi[:name], $pi[:password]) - $secondpi[:subjectid] = OpenTox::Authorization.authenticate($secondpi[:name], $secondpi[:password]) - unauthorized_error "Failed to authenticate user \"#{$aa[:user]}\"." unless OpenTox::Authorization.is_token_valid $pi[:subjectid] - unauthorized_error "Failed to authenticate user \"#{$aa[:user]}\"." unless OpenTox::Authorization.is_token_valid $secondpi[:subjectid] + OpenTox::RestClientWrapper.subjectid = OpenTox::Authorization.authenticate($aa[:user], $aa[:password]) + unauthorized_error "Failed to authenticate user \"#{$pi[:user]}\"." unless OpenTox::Authorization.is_token_valid OpenTox::RestClientWrapper.subjectid end |