Mailinglist Archive: yast-commit (1771 mails)

< Previous Next >
[yast-commit] <rest-service> network : Use format instead of content type, as it seems to set the
  • From: Duncan Mac-Vicar P <dmacvicar@xxxxxxx>
  • Date: Tue, 25 Aug 2009 00:01:33 +0200
  • Message-id: <E1MiTqL-0006ds-MO@xxxxxxxxxxxxxxxx>
ref: refs/heads/network
commit 72faf37c3f8dda4ab91a97f677f8833a775bded8
Author: Duncan Mac-Vicar P <dmacvicar@xxxxxxx>
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@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages