Mailinglist Archive: yast-commit (1771 mails)

< Previous Next >
[yast-commit] <rest-service> master : fix test for system
  • From: Josef Reidinger <jreidinger@xxxxxxx>
  • Date: Thu, 3 Sep 2009 10:29:14 +0200
  • Message-id: <E1Mj7h6-0003KX-D5@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit a3ef7cd80e46e87e2ba7ce1adc5e6a25c21906b8
Author: Josef Reidinger <jreidinger@xxxxxxx>
Date: Thu Sep 3 10:29:14 2009 +0200

fix test for system
---
.../test/functional/system_controller_test.rb | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugins/system/test/functional/system_controller_test.rb
b/plugins/system/test/functional/system_controller_test.rb
index 0f9e94b..4ca465d 100644
--- a/plugins/system/test/functional/system_controller_test.rb
+++ b/plugins/system/test/functional/system_controller_test.rb
@@ -82,11 +82,11 @@ class SystemControllerTest < ActionController::TestCase
end

test "return error when not permitted" do
- @controller.stubs(:permission_check).returns(false);
+
@controller.stubs(:permission_check).raises(NoPermissionException.new("action",
"test"))

ret = put :update, :system => {:reboot => {:active => true}}
# expect 403 Forbidden error code
- assert_response :forbidden
+ assert_response 503

# set permissions back for the other tests
@controller.stubs(:permission_check).returns(true);
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages