@@ -22,6 +22,7 class Redmine::ApiTest::ApiRoutingTest < Redmine::ApiTest::Routing | |||
|
22 | 22 | def test_attachments |
|
23 | 23 | should_route 'GET /attachments/1' => 'attachments#show', :id => '1' |
|
24 | 24 | should_route 'PATCH /attachments/1' => 'attachments#update', :id => '1' |
|
25 | should_route 'DELETE /attachments/1' => 'attachments#destroy', :id => '1' | |
|
25 | 26 | should_route 'POST /uploads' => 'attachments#upload' |
|
26 | 27 | end |
|
27 | 28 |
@@ -81,7 +81,7 class Redmine::ApiTest::AttachmentsTest < Redmine::ApiTest::Base | |||
|
81 | 81 | assert_response :success |
|
82 | 82 | end |
|
83 | 83 | |
|
84 |
test "D |
|
|
84 | test "DELETE /attachments/:id.xml should return ok and delete Attachment" do | |
|
85 | 85 | assert_difference 'Attachment.count', -1 do |
|
86 | 86 | delete '/attachments/7.xml', {}, credentials('jsmith') |
|
87 | 87 | assert_response :ok |
@@ -90,7 +90,7 class Redmine::ApiTest::AttachmentsTest < Redmine::ApiTest::Base | |||
|
90 | 90 | assert_nil Attachment.find_by_id(7) |
|
91 | 91 | end |
|
92 | 92 | |
|
93 |
test "D |
|
|
93 | test "DELETE /attachments/:id.json should return ok and delete Attachment" do | |
|
94 | 94 | assert_difference 'Attachment.count', -1 do |
|
95 | 95 | delete '/attachments/7.json', {}, credentials('jsmith') |
|
96 | 96 | assert_response :ok |
General Comments 0
You need to be logged in to leave comments.
Login now