Mercurial > hg > soundsoftware-site
comparison test/integration/layout_test.rb @ 909:cbb26bc654de redmine-1.3
Update to Redmine 1.3-stable branch (Redmine SVN rev 8964)
author | Chris Cannam |
---|---|
date | Fri, 24 Feb 2012 19:09:32 +0000 |
parents | cbce1fd3b1b7 |
children | 433d4f72a19b |
comparison
equal
deleted
inserted
replaced
908:c6c2cbd0afee | 909:cbb26bc654de |
---|---|
1 require File.expand_path('../../test_helper', __FILE__) | 1 require File.expand_path('../../test_helper', __FILE__) |
2 | 2 |
3 class LayoutTest < ActionController::IntegrationTest | 3 class LayoutTest < ActionController::IntegrationTest |
4 fixtures :all | 4 fixtures :projects, :trackers, :issue_statuses, :issues, |
5 :enumerations, :users, :issue_categories, | |
6 :projects_trackers, | |
7 :roles, | |
8 :member_roles, | |
9 :members, | |
10 :enabled_modules, | |
11 :workflows | |
5 | 12 |
6 test "browsing to a missing page should render the base layout" do | 13 test "browsing to a missing page should render the base layout" do |
7 get "/users/100000000" | 14 get "/users/100000000" |
8 | 15 |
9 assert_response :not_found | 16 assert_response :not_found |
12 assert_select "#admin-menu", :count => 0 | 19 assert_select "#admin-menu", :count => 0 |
13 end | 20 end |
14 | 21 |
15 test "browsing to an unauthorized page should render the base layout" do | 22 test "browsing to an unauthorized page should render the base layout" do |
16 change_user_password('miscuser9', 'test') | 23 change_user_password('miscuser9', 'test') |
17 | 24 |
18 log_user('miscuser9','test') | 25 log_user('miscuser9','test') |
19 | 26 |
20 get "/admin" | 27 get "/admin" |
21 assert_response :forbidden | 28 assert_response :forbidden |
22 assert_select "#admin-menu", :count => 0 | 29 assert_select "#admin-menu", :count => 0 |
35 get '/' | 42 get '/' |
36 assert_select "#top-menu > ul" | 43 assert_select "#top-menu > ul" |
37 assert_select "#quick-search" | 44 assert_select "#quick-search" |
38 end | 45 end |
39 end | 46 end |
40 | 47 |
41 def test_wiki_formatter_header_tags | 48 def test_wiki_formatter_header_tags |
42 Role.anonymous.add_permission! :add_issues | 49 Role.anonymous.add_permission! :add_issues |
43 | 50 |
44 get '/projects/ecookbook/issues/new' | 51 get '/projects/ecookbook/issues/new' |
45 assert_tag :script, | 52 assert_tag :script, |
46 :attributes => {:src => %r{^/javascripts/jstoolbar/textile.js}}, | 53 :attributes => {:src => %r{^/javascripts/jstoolbar/textile.js}}, |
47 :parent => {:tag => 'head'} | 54 :parent => {:tag => 'head'} |
48 end | 55 end |