aboutsummaryrefslogtreecommitdiff
path: root/test/tc_mauve_web_interface.rb
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2012-04-21 13:37:12 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2012-04-21 13:37:12 +0100
commit84b1abf30fe79032209cb0fcd0bfa9d6aaf37721 (patch)
tree403433b040d2b51b5d40c56b10a530e7fcf2aef4 /test/tc_mauve_web_interface.rb
parent392a87cfa181a762bf4b3244aa3c6d065ef15253 (diff)
Overhaul of authentication.
* Added new configuration options: ** bytemark_calendar_url ** bytemark_auth_url ** remote_https_verify_mode ** remote_http_timeout ** failed_login_delay * Added authentication tests * Removed remote auth tests in from the web interface tests. * If no bytemark_auth_url is set, then no remote auth takes place. * SSL peer cert validation now takes place by default. * Removed old logic tests * Tidied the way tests take place a little.
Diffstat (limited to 'test/tc_mauve_web_interface.rb')
-rw-r--r--test/tc_mauve_web_interface.rb18
1 files changed, 4 insertions, 14 deletions
diff --git a/test/tc_mauve_web_interface.rb b/test/tc_mauve_web_interface.rb
index 69828e9..54c9697 100644
--- a/test/tc_mauve_web_interface.rb
+++ b/test/tc_mauve_web_interface.rb
@@ -53,12 +53,6 @@ class WebInterfaceTest < Mauve::UnitTest
super
setup_database
- #
- # BytemarkAuth test users are:
- #
- # test1: ummVRu7qF
- # test2: POKvBqLT7
- #
config =<<EOF
server {
hostname "localhost"
@@ -70,13 +64,8 @@ server {
}
}
-person ("test0") {
- password "#{Digest::SHA1.new.hexdigest("password")}"
- all { true }
-}
-
person ("test1") {
- password "#{Digest::SHA1.new.hexdigest("ummVRu7qF")}"
+ password "#{Digest::SHA1.new.hexdigest("goodpassword")}"
all { true }
}
@@ -156,9 +145,10 @@ EOF
#
logger_pop ; logger_pop
- post '/login', :username => 'test1', :password => 'ummVRu7qF'
+ post '/login', :username => 'test1', :password => 'goodpassword'
follow_redirect! while last_response.redirect?
assert last_response.body.include?('Mauve: ')
+ assert last_response.ok?
get '/logout'
follow_redirect! while last_response.redirect?
@@ -166,7 +156,7 @@ EOF
end
def test_alerts_show_subject
- post '/login', :username => 'test1', :password => 'ummVRu7qF'
+ post '/login', :username => 'test1', :password => 'goodpassword'
follow_redirect! while last_response.redirect?
assert last_response.body.include?('Mauve: ')