ref: refs/heads/backgroud_patches_bnc550934 commit e65f6c415f9a06b612efd8a2bd8e4cb5518e7c84 Author: Josef Reidinger <jreidinger@suse.cz> Date: Fri Dec 11 13:34:32 2009 +0100 fix test suite to test new behavior (no longer force UTC if ntp is called) fix depracated warning --- .../test/functional/systemtime_controller_test.rb | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/systemtime/test/functional/systemtime_controller_test.rb b/plugins/systemtime/test/functional/systemtime_controller_test.rb index 2ce2a9a..e952e8c 100644 --- a/plugins/systemtime/test/functional/systemtime_controller_test.rb +++ b/plugins/systemtime/test/functional/systemtime_controller_test.rb @@ -20,10 +20,11 @@ class SystemtimeControllerTest < ActionController::TestCase end class Ntp - attr_accessor :synchronize + attr_accessor :synchronize, :synchronize_utc def initialize @synchronize = false + @synchronize_utc = true end def save @@ -114,7 +115,7 @@ class SystemtimeControllerTest < ActionController::TestCase YaST::ServiceResource.stubs(:proxy_for).with('org.opensuse.yast.modules.yapi.time').returns(@proxy) post :update, { :currenttime => "2009-07-02 - 12:18:00", :date => { :date => "2009-07-02 - 12:18:00/2009-07-02 - 12:18:00" } } assert_response :redirect - assert_redirected_to :action => "index" + assert_redirected_to :controller => "controlpanel", :action => "index" assert @result.saved assert_equal "localtime",@result.utcstatus @@ -134,16 +135,15 @@ class SystemtimeControllerTest < ActionController::TestCase assert_equal "localtime",@result.utcstatus end - def test_ntp_force_utc + def test_ntp_force YaST::ServiceResource.stubs(:proxy_for).with('org.opensuse.yast.modules.yapi.time').returns(@proxy) ntpproxy = NtpProxy.new ntpproxy.result = Ntp.new YaST::ServiceResource.stubs(:proxy_for).with('org.opensuse.yast.modules.yapi.ntp').returns(ntpproxy) post :update, { :timeconfig => "ntp_sync" } assert_response :redirect - assert_redirected_to :action => "index" + assert_redirected_to :controller => "controlpanel", :action => "index" assert ntpproxy.result.synchronize - assert_equal "UTC", @result.utcstatus end end -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org