summaryrefslogtreecommitdiff
path: root/lib/authenticated_test_helper.rb
diff options
context:
space:
mode:
authorsimon <simon@zagal.(none)>2009-02-08 23:15:11 +0100
committerhukl <hukl@eight.local>2009-02-15 20:22:01 +0100
commit9f94a70c3e3d9bf766cb9663b0a904d30a190d85 (patch)
tree4b4bbf567ec60a939d024b083b478d72476700a5 /lib/authenticated_test_helper.rb
parent48ffd4eb446bcaeba7651758ec3002f342702249 (diff)
* initial commit of the stripped restful-authentication
* http basic auth and login from cookie have been removed * no it does not work yet, it's so f*cking secure, it won't even let legitimate users login
Diffstat (limited to 'lib/authenticated_test_helper.rb')
-rw-r--r--lib/authenticated_test_helper.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/authenticated_test_helper.rb b/lib/authenticated_test_helper.rb
new file mode 100644
index 0000000..c0ec5f4
--- /dev/null
+++ b/lib/authenticated_test_helper.rb
@@ -0,0 +1,6 @@
1module AuthenticatedTestHelper
2 # Sets the current user in the session from the user fixtures.
3 def login_as(user)
4 @request.session[:user_id] = user ? users(user).id : nil
5 end
6end