@@ -40,6 +40,17 class MessagesControllerTest < ActionController::TestCase | |||||
40 | assert_not_nil assigns(:topic) |
|
40 | assert_not_nil assigns(:topic) | |
41 | end |
|
41 | end | |
42 |
|
42 | |||
|
43 | def test_show_should_contain_reply_field_tags_for_quoting | |||
|
44 | @request.session[:user_id] = 2 | |||
|
45 | get :show, :board_id => 1, :id => 1 | |||
|
46 | assert_response :success | |||
|
47 | ||||
|
48 | # tags required by MessagesController#quote | |||
|
49 | assert_tag 'input', :attributes => {:id => 'message_subject'} | |||
|
50 | assert_tag 'textarea', :attributes => {:id => 'message_content'} | |||
|
51 | assert_tag 'div', :attributes => {:id => 'reply'} | |||
|
52 | end | |||
|
53 | ||||
43 | def test_show_with_pagination |
|
54 | def test_show_with_pagination | |
44 | message = Message.find(1) |
|
55 | message = Message.find(1) | |
45 | assert_difference 'Message.count', 30 do |
|
56 | assert_difference 'Message.count', 30 do |
General Comments 0
You need to be logged in to leave comments.
Login now