ref: refs/heads/basesystem
commit 72faf37c3f8dda4ab91a97f677f8833a775bded8
Author: Duncan Mac-Vicar P
Date: Tue Aug 25 00:01:33 2009 +0200
Use format instead of content type, as it seems to set the
content type too.
Specify format as string, as this parameter does not work with symbols
---
webservice/test/plugin_basic_tests.rb | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/webservice/test/plugin_basic_tests.rb b/webservice/test/plugin_basic_tests.rb
index 2e6f625..68409c5 100644
--- a/webservice/test/plugin_basic_tests.rb
+++ b/webservice/test/plugin_basic_tests.rb
@@ -51,21 +51,17 @@ module PluginBasicTests
assert_response :forbidden
end
-=begin
def test_access_show_xml
mime = Mime::XML
- @request.accept = mime.to_s
- get :show, :format => :xml
+ get :show, :format => 'xml'
assert_equal mime.to_s, @response.content_type
end
def test_access_show_json
mime = Mime::JSON
- @request.accept = mime.to_s
- get :show, :format => :json
+ get :show, :format => 'json'
assert_equal mime.to_s, @response.content_type
end
-=end
def test_update_noparams
@model_class.stubs(:save)
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org