mirror of
https://github.com/redmine/redmine.git
synced 2026-05-07 03:36:36 +02:00
Merged r9836 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.0-stable@9845 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -55,6 +55,20 @@ class BoardsControllerTest < ActionController::TestCase
|
||||
assert_not_nil assigns(:topics)
|
||||
end
|
||||
|
||||
def test_show_should_display_sticky_messages_first
|
||||
Message.update_all(:sticky => 0)
|
||||
Message.update_all({:sticky => 1}, {:id => 1})
|
||||
|
||||
get :show, :project_id => 1, :id => 1
|
||||
assert_response :success
|
||||
|
||||
topics = assigns(:topics)
|
||||
assert_not_nil topics
|
||||
assert topics.size > 1, "topics size was #{topics.size}"
|
||||
assert topics.first.sticky?
|
||||
assert topics.first.updated_on < topics.second.updated_on
|
||||
end
|
||||
|
||||
def test_show_with_permission_should_display_the_new_message_form
|
||||
@request.session[:user_id] = 2
|
||||
get :show, :project_id => 1, :id => 1
|
||||
|
||||
Reference in New Issue
Block a user