From 8b79988c4c6cedd77664e14f16b149a669965eff Mon Sep 17 00:00:00 2001 From: Azul Date: Sun, 14 Jul 2013 19:52:54 +0200 Subject: make sure capybara runs the whole rack app We use port 3003 for the integration test server. This test takes a few seconds (~8) now. Most of this is startup time of the server. A second run still takes 2 seconds like before. --- users/test/integration/api/rack_test.rb | 3 --- 1 file changed, 3 deletions(-) (limited to 'users/test/integration/api') diff --git a/users/test/integration/api/rack_test.rb b/users/test/integration/api/rack_test.rb index da960f2..9a69f52 100644 --- a/users/test/integration/api/rack_test.rb +++ b/users/test/integration/api/rack_test.rb @@ -1,6 +1,3 @@ -CONFIG_RU = (Rails.root + 'config.ru').to_s -OUTER_APP = Rack::Builder.parse_file(CONFIG_RU).first - class RackTest < ActiveSupport::TestCase include Rack::Test::Methods include Warden::Test::Helpers -- cgit v1.2.3 From 8486248a7a960bc75f25f2c5a00791416f124ac4 Mon Sep 17 00:00:00 2001 From: Azul Date: Tue, 16 Jul 2013 13:14:01 +0200 Subject: adapt srp account_flow test for the api to new ruby_srp API --- users/test/integration/api/account_flow_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'users/test/integration/api') diff --git a/users/test/integration/api/account_flow_test.rb b/users/test/integration/api/account_flow_test.rb index f5cb0b1..4c94389 100644 --- a/users/test/integration/api/account_flow_test.rb +++ b/users/test/integration/api/account_flow_test.rb @@ -26,19 +26,19 @@ class AccountFlowTest < RackTest def handshake(login, aa) post "http://api.lvh.me:3000/1/sessions.json", :login => login, - 'A' => aa.to_s(16), + 'A' => aa, :format => :json response = JSON.parse(last_response.body) if response['errors'] raise RECORD_NOT_FOUND.new(response['errors']) else - return response['B'].hex + return response['B'] end end def validate(m) put "http://api.lvh.me:3000/1/sessions/" + @login + '.json', - :client_auth => m.to_s(16), + :client_auth => m, :format => :json return JSON.parse(last_response.body) end -- cgit v1.2.3