Mercurial > hg > soundsoftware-site
comparison test/functional/queries_controller_test.rb @ 1298:4f746d8966dd redmine_2.3_integration
Merge from redmine-2.3 branch to create new branch redmine-2.3-integration
| author | Chris Cannam |
|---|---|
| date | Fri, 14 Jun 2013 09:28:30 +0100 |
| parents | 622f24f53b42 |
| children |
comparison
equal
deleted
inserted
replaced
| 1297:0a574315af3e | 1298:4f746d8966dd |
|---|---|
| 1 # Redmine - project management software | 1 # Redmine - project management software |
| 2 # Copyright (C) 2006-2012 Jean-Philippe Lang | 2 # Copyright (C) 2006-2013 Jean-Philippe Lang |
| 3 # | 3 # |
| 4 # This program is free software; you can redistribute it and/or | 4 # This program is free software; you can redistribute it and/or |
| 5 # modify it under the terms of the GNU General Public License | 5 # modify it under the terms of the GNU General Public License |
| 6 # as published by the Free Software Foundation; either version 2 | 6 # as published by the Free Software Foundation; either version 2 |
| 7 # of the License, or (at your option) any later version. | 7 # of the License, or (at your option) any later version. |
| 22 | 22 |
| 23 def setup | 23 def setup |
| 24 User.current = nil | 24 User.current = nil |
| 25 end | 25 end |
| 26 | 26 |
| 27 def test_index | |
| 28 get :index | |
| 29 # HTML response not implemented | |
| 30 assert_response 406 | |
| 31 end | |
| 32 | |
| 27 def test_new_project_query | 33 def test_new_project_query |
| 28 @request.session[:user_id] = 2 | 34 @request.session[:user_id] = 2 |
| 29 get :new, :project_id => 1 | 35 get :new, :project_id => 1 |
| 30 assert_response :success | 36 assert_response :success |
| 31 assert_template 'new' | 37 assert_template 'new' |
| 106 | 112 |
| 107 q = Query.find_by_name('test_new_global_private_query') | 113 q = Query.find_by_name('test_new_global_private_query') |
| 108 assert_redirected_to :controller => 'issues', :action => 'index', :project_id => nil, :query_id => q | 114 assert_redirected_to :controller => 'issues', :action => 'index', :project_id => nil, :query_id => q |
| 109 assert !q.is_public? | 115 assert !q.is_public? |
| 110 assert !q.has_default_columns? | 116 assert !q.has_default_columns? |
| 111 assert_equal [:tracker, :subject, :priority, :category], q.columns.collect {|c| c.name} | 117 assert_equal [:id, :tracker, :subject, :priority, :category], q.columns.collect {|c| c.name} |
| 112 assert q.valid? | 118 assert q.valid? |
| 113 end | 119 end |
| 114 | 120 |
| 115 def test_create_global_query_with_custom_filters | 121 def test_create_global_query_with_custom_filters |
| 116 @request.session[:user_id] = 3 | 122 @request.session[:user_id] = 3 |
