ref: refs/heads/network
commit 14c00d8f925b2c519a0de1110475afe0635d8175
Author: Michal Zugec
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@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org