ref: refs/heads/patch_refactor commit 0a1ccba911d786bf960199176cf5795e33d84631 Author: Josef Reidinger <jreidinger@suse.cz> Date: Tue Sep 22 17:02:47 2009 +0200 fix tests, update no longer redirect --- plugins/ntp/test/functional/ntp_controller_test.rb | 3 +-- plugins/ntp/test/test_helper.rb | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/ntp/test/functional/ntp_controller_test.rb b/plugins/ntp/test/functional/ntp_controller_test.rb index 41e5294..9709de5 100644 --- a/plugins/ntp/test/functional/ntp_controller_test.rb +++ b/plugins/ntp/test/functional/ntp_controller_test.rb @@ -25,8 +25,7 @@ class SystemControllerTest < ActionController::TestCase def test_update YastService.stubs(:Call).with("YaPI::NTP::Synchronize").once.returns("OK") post :update, {"ntp"=>{"synchronize"=>true}} - assert_response :redirect - assert_redirected_to :action => "show" + assert_response :success end def test_update_failed diff --git a/plugins/ntp/test/test_helper.rb b/plugins/ntp/test/test_helper.rb index 7d67910..ef40956 100644 --- a/plugins/ntp/test/test_helper.rb +++ b/plugins/ntp/test/test_helper.rb @@ -1,9 +1,9 @@ +# then enable testing, this will get the routing right +ENV["RAILS_ENV"] = "test" # find the rails parent require File.join(File.dirname(__FILE__), '..', 'config', 'rails_parent') # first config rails require File.expand_path( File.join("config","environment"), RailsParent.parent ) -# then enable testing, this will get the routing right -ENV["RAILS_ENV"] = "test" require 'test_help' class ActiveSupport::TestCase -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org