Mercurial > hg > soundsoftware-site
diff test/integration/application_test.rb @ 1337:077b8890835a cannam
Merge from live branch
author | Chris Cannam |
---|---|
date | Thu, 20 Jun 2013 13:14:02 +0100 |
parents | 433d4f72a19b |
children | 622f24f53b42 261b3d9a4903 |
line wrap: on
line diff
--- a/test/integration/application_test.rb Fri Jun 14 11:30:07 2013 +0100 +++ b/test/integration/application_test.rb Thu Jun 20 13:14:02 2013 +0100 @@ -1,5 +1,5 @@ # Redmine - project management software -# Copyright (C) 2006-2011 Jean-Philippe Lang +# Copyright (C) 2006-2012 Jean-Philippe Lang # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -33,19 +33,19 @@ Setting.default_language = 'en' # a french user - get 'projects', { }, 'Accept-Language' => 'fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3' + get 'projects', { }, 'HTTP_ACCEPT_LANGUAGE' => 'fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3' assert_response :success assert_tag :tag => 'h2', :content => 'Projets' assert_equal :fr, current_language # then an italien user - get 'projects', { }, 'Accept-Language' => 'it;q=0.8,en-us;q=0.5,en;q=0.3' + get 'projects', { }, 'HTTP_ACCEPT_LANGUAGE' => 'it;q=0.8,en-us;q=0.5,en;q=0.3' assert_response :success assert_tag :tag => 'h2', :content => 'Progetti' assert_equal :it, current_language # not a supported language: default language should be used - get 'projects', { }, 'Accept-Language' => 'zz' + get 'projects', { }, 'HTTP_ACCEPT_LANGUAGE' => 'zz' assert_response :success assert_tag :tag => 'h2', :content => 'Projects' end @@ -60,4 +60,9 @@ assert_response 200 assert_nil session[:user_id] end + + def test_missing_template_should_respond_with_404 + get '/login.png' + assert_response 404 + end end