[yast-commit] <web-client> jr-yastmodel : fix http mock to expect authentification
ref: refs/heads/jr-yastmodel commit 459443dee32878b093a39842ec4fc9ae2f6e921f Author: Josef Reidinger <jreidinger@suse.cz> Date: Mon Dec 21 13:10:10 2009 +0100 fix http mock to expect authentification --- webclient/test/unit/yast_model_test.rb | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/webclient/test/unit/yast_model_test.rb b/webclient/test/unit/yast_model_test.rb index d013678..b15ba31 100644 --- a/webclient/test/unit/yast_model_test.rb +++ b/webclient/test/unit/yast_model_test.rb @@ -33,7 +33,7 @@ def setup ActiveResource::HttpMock.respond_to do |mock| mock.get "/resources.xml", {}, RESOURCE_RESPONSE, 200 mock.get "/permissions.xml", {}, PERMISSION_RESPONSE,200 - mock.get "/test.xml", {}, TEST_RESPONSE, 200 + mock.get "/test.xml", {"Authorization"=>"Basic OjEyMzQ="}, TEST_RESPONSE, 200 end YaST::ServiceResource::Session.site = "http://localhost" YaST::ServiceResource::Session.login = "test" @@ -46,15 +46,17 @@ end def test_model assert TestModel.site.to_s.include?('localhost'), "site doesn't include localhost : #{TestModel.site}" - puts YastModel::Base.collection_name - puts TestModel.collection_name assert_equal "test",TestModel.collection_name assert_equal "/",TestModel.prefix end def test_find - test = TestModel.find :one - assert "test",test.arg1 + begin + test = TestModel.find :one + assert "test",test.arg1 + ensure + puts ActiveResource::HttpMock.requests.inspect + end end end -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
Josef Reidinger