Mailinglist Archive: yast-commit (1809 mails)

< Previous Next >
[yast-commit] <rest-service> network : test that xml contains required elements
  • From: Michal Zugec <mzugec@xxxxxxx>
  • Date: Fri, 4 Sep 2009 09:34:53 +0200
  • Message-id: <E1MjTKS-0008Oi-5t@xxxxxxxxxxxxxxxx>
ref: refs/heads/network
commit 14c00d8f925b2c519a0de1110475afe0635d8175
Author: Michal Zugec <mzugec@xxxxxxx>
Date: Fri Sep 4 09:34:53 2009 +0200

test that xml contains required elements
---
.../test/functional/hostname_controller_test.rb | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/plugins/network/test/functional/hostname_controller_test.rb
b/plugins/network/test/functional/hostname_controller_test.rb
index 1f26a95..a28d07d 100644
--- a/plugins/network/test/functional/hostname_controller_test.rb
+++ b/plugins/network/test/functional/hostname_controller_test.rb
@@ -16,6 +16,13 @@ class HostnameControllerTest < ActionController::TestCase
@request.session[:account_id] = 1 # defined in fixtures
end

+ def test_content_of_xml
+ get :show, :format => 'xml'
+ h=Hash.from_xml @response.body
+ assert_equal 'BAD', h['hostname']['name']
+ assert_equal 'DOMAIN', h['hostname']['domain']
+ end
+
include PluginBasicTests

end
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages