Feature #22482 » 0001-Add-basic-test-for-image-view-22058.patch
| test/functional/attachments_controller_test.rb | ||
|---|---|---|
| 189 | 189 |
set_tmp_attachments_directory |
| 190 | 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 |
|
| 192 | 200 |
def test_show_other |
| 193 | 201 |
get :show, :id => 6 |
| 194 | 202 |
assert_response :success |