diff options
author | James Ramsay <jramsay@gitlab.com> | 2018-08-02 22:39:46 +0300 |
---|---|---|
committer | James Ramsay <jramsay@gitlab.com> | 2018-08-03 18:55:21 +0300 |
commit | 79d90cb6bd99b7af572c65af89597c2e55217aea (patch) | |
tree | d28302d2bd63504b46c4eeef2877b4a3d099f893 /spec/requests/api/projects_spec.rb | |
parent | c60cb3935089eeb358b8e96e63d879d5b49a3dcf (diff) |
Use Projects::UpdateService to archive projects
System hooks were not being triggered when projects were archived or
unarchived. Reuse the Projects::UpdateService to automatically
trigger system hooks and increase code reuse.
Diffstat (limited to 'spec/requests/api/projects_spec.rb')
-rw-r--r-- | spec/requests/api/projects_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb index 71e3436fa76..eb41750bf47 100644 --- a/spec/requests/api/projects_spec.rb +++ b/spec/requests/api/projects_spec.rb @@ -1677,7 +1677,7 @@ describe API::Projects do context 'on an archived project' do before do - project.archive! + ::Projects::UpdateService.new(project, user, archived: true).execute end it 'remains archived' do @@ -1713,7 +1713,7 @@ describe API::Projects do context 'on an archived project' do before do - project.archive! + ::Projects::UpdateService.new(project, user, archived: true).execute end it 'unarchives the project' do |