summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-03-01 10:15:38 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-03-01 10:15:38 +0000
commit38db62f1e711ef6327f4d26bac300062875a7236 (patch)
tree93a8a934f94e0458507cb950c9ed8af390a7192a /test
parentb78349d2caab75e75dd7a0754ca1fc64379fa07c (diff)
downloadredmine-38db62f1e711ef6327f4d26bac300062875a7236.tar.gz
redmine-38db62f1e711ef6327f4d26bac300062875a7236.zip
Fixed that some error messages were not displayed (#2866).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2542 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/functional/issues_controller_test.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index ebc2aa8b8..6748f078f 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -379,6 +379,28 @@ class IssuesControllerTest < Test::Unit::TestCase
assert_equal Project.find(1).trackers.first, issue.tracker
end
+ def test_get_new_with_no_default_status_should_display_an_error
+ @request.session[:user_id] = 2
+ IssueStatus.delete_all
+
+ get :new, :project_id => 1
+ assert_response 500
+ assert_not_nil flash[:error]
+ assert_tag :tag => 'div', :attributes => { :class => /error/ },
+ :content => /No default issue/
+ end
+
+ def test_get_new_with_no_tracker_should_display_an_error
+ @request.session[:user_id] = 2
+ Tracker.delete_all
+
+ get :new, :project_id => 1
+ assert_response 500
+ assert_not_nil flash[:error]
+ assert_tag :tag => 'div', :attributes => { :class => /error/ },
+ :content => /No tracker/
+ end
+
def test_update_new_form
@request.session[:user_id] = 2
xhr :post, :new, :project_id => 1,