ref: refs/heads/master
commit 7fa32178a710529262f3b8be692c3d325c3d18bc
Author: Josef Reidinger
Date: Mon Jul 13 13:36:28 2009 +0200
add test for validation of generated page
---
.../test/functional/language_controller_test.rb | 4 ++++
.../app/controllers/system_time_controller.rb | 3 +--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/plugins/language/test/functional/language_controller_test.rb b/plugins/language/test/functional/language_controller_test.rb
index 4b21be8..a8becac 100644
--- a/plugins/language/test/functional/language_controller_test.rb
+++ b/plugins/language/test/functional/language_controller_test.rb
@@ -1,9 +1,11 @@
require File.expand_path(File.dirname(__FILE__) + "/../test_helper")
require 'test/unit'
+require File.expand_path( File.join("test","validation_assert"), RailsParent.parent )
require 'rubygems'
require 'mocha'
+
class LanguageControllerTest < ActionController::TestCase
# fixtures :accounts
@@ -63,6 +65,7 @@ class LanguageControllerTest < ActionController::TestCase
#check if everything is correctly setted
assert_response :success
+ assert_valid_markup
assert assigns(:permissions)
assert assigns(:permissions)[:read]
assert assigns(:permissions)[:write]
@@ -114,6 +117,7 @@ class LanguageControllerTest < ActionController::TestCase
get :index
assert_response :success
+ assert_valid_markup
assert assigns(:permissions)
assert assigns(:permissions)[:read]
assert !assigns(:permissions)[:write]
diff --git a/plugins/systemtime/app/controllers/system_time_controller.rb b/plugins/systemtime/app/controllers/system_time_controller.rb
index 387f53b..c09680a 100644
--- a/plugins/systemtime/app/controllers/system_time_controller.rb
+++ b/plugins/systemtime/app/controllers/system_time_controller.rb
@@ -88,8 +88,7 @@ class SystemTimeController < ApplicationController
if response
flash[:notice] = _('Settings have been written.')
redirect_to :action => :index
- else
-
+ else
redirect_to :action => :index
end
end
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org