From ad098c8ed566b0d974b9512cd8e52c575742a062 Mon Sep 17 00:00:00 2001 From: gebele Date: Wed, 8 Jan 2014 13:42:08 +0100 Subject: check that authorized user can get ftp file --- test/toxbank-investigation-rest.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/toxbank-investigation-rest.rb b/test/toxbank-investigation-rest.rb index 5e356f4..971819d 100644 --- a/test/toxbank-investigation-rest.rb +++ b/test/toxbank-investigation-rest.rb @@ -480,8 +480,11 @@ class TBInvestigationREST < MiniTest::Test # @note data is available with policy def test_10_i_guest_can_get - res = OpenTox::RestClientWrapper.get @@uri.to_s, {}, {:accept => "application/rdf+xml"} + res = OpenTox::RestClientWrapper.get @@uri.to_s, {}, {:accept => "application/rdf+xml", :subjectid => $guestid} assert_match /<\?xml/, res + #guest is authorized to get ftp file + result = OpenTox::RestClientWrapper.get("#{@@uri}", {}, {:accept => "text/uri-list", :subjectid => $guestid}).split("\n") + assert_match "#{@@uri}/isatab/JIC37_Ethanol_0.07_Internal_1_3.txt", result.to_s end # get investigation/{id}/metadata in rdf and check content -- cgit v1.2.3