@@ -189,6 +189,15 class AttachmentsControllerTest < ActionController::TestCase | |||||
189 | set_tmp_attachments_directory |
|
189 | set_tmp_attachments_directory | |
190 | end |
|
190 | end | |
191 |
|
191 | |||
|
192 | def test_show_image | |||
|
193 | @request.session[:user_id] = 2 | |||
|
194 | get :show, :id => 16 | |||
|
195 | assert_response :success | |||
|
196 | assert_template 'image' | |||
|
197 | assert_equal 'text/html', @response.content_type | |||
|
198 | assert_select 'img.filecontent', :src => attachments(:attachments_010).filename | |||
|
199 | end | |||
|
200 | ||||
192 | def test_show_other |
|
201 | def test_show_other | |
193 | get :show, :id => 6 |
|
202 | get :show, :id => 6 | |
194 | assert_response :success |
|
203 | assert_response :success |
General Comments 0
You need to be logged in to leave comments.
Login now