ref: refs/heads/master
commit 7989f6a0420ba27e127073d22bacee968953476f
Author: Duncan Mac-Vicar P
Date: Wed Aug 12 18:41:58 2009 +0200
more broken testcases.
AGAIN: testcase that access the system is no testcase unless that system
is part of your test environment/infrastructure
---
.../test/functional/services_controller_test.rb | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/plugins/services/test/functional/services_controller_test.rb b/plugins/services/test/functional/services_controller_test.rb
index dcec53f..b9bb834 100644
--- a/plugins/services/test/functional/services_controller_test.rb
+++ b/plugins/services/test/functional/services_controller_test.rb
@@ -12,6 +12,17 @@ class ServicesControllerTest < ActionController::TestCase
@request = ActionController::TestRequest.new
# http://railsforum.com/viewtopic.php?id=1719
@request.session[:account_id] = 1 # defined in fixtures
+
+ s1 = Service.new
+ s1.name = "foo"
+ s1.status = 0
+
+ s2 = Service.new
+ s2.name = "cron"
+ s2.status = 1
+
+ Service.stubs(:find_all).returns([s1, s2])
+ Service.stubs(:find).with("cron").returns([s2])
end
test "access index" do
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org