mirror of
https://github.com/redmine/redmine.git
synced 2025-11-08 06:15:59 +01:00
API to archive/unarchive projects (#35420).
Patch by Felix Schäfer. git-svn-id: http://svn.redmine.org/redmine/trunk@21044 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -356,4 +356,21 @@ class Redmine::ApiTest::ProjectsTest < Redmine::ApiTest::Base
|
||||
assert_equal '', @response.body
|
||||
assert_nil Project.find_by_id(2)
|
||||
end
|
||||
|
||||
test "PUT /projects/:id/archive.xml should archive project" do
|
||||
put '/projects/1/archive.xml', :headers => credentials('admin')
|
||||
assert_response :no_content
|
||||
assert_equal '', @response.body
|
||||
assert p = Project.find(1)
|
||||
assert_not p.active?
|
||||
end
|
||||
|
||||
test "PUT /projects/:id/unarchive.xml should unarchive project" do
|
||||
Project.find(1).update_column :status, Project::STATUS_ARCHIVED
|
||||
put '/projects/1/unarchive.xml', :headers => credentials('admin')
|
||||
assert_response :no_content
|
||||
assert_equal '', @response.body
|
||||
assert p = Project.find_by_id(2)
|
||||
assert p.active?
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user