diff options
author | Ashley Dumaine <adumaine@datto.com> | 2017-09-02 01:39:22 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2017-09-06 12:07:47 +0300 |
commit | a3f76b76a4b8db85c6fa557a5e801dcea7195735 (patch) | |
tree | 730f99b9e673ed511a41113cd713ed39702c839f /spec/requests | |
parent | 959e6d221d6b11c64d17fc9d4734200806c293ab (diff) |
change collapse to resolve and comments to discussions
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/projects_spec.rb | 28 | ||||
-rw-r--r-- | spec/requests/api/v3/projects_spec.rb | 28 |
2 files changed, 28 insertions, 28 deletions
diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb index 5e3fdbd468e..1e71634b5db 100644 --- a/spec/requests/api/projects_spec.rb +++ b/spec/requests/api/projects_spec.rb @@ -414,7 +414,7 @@ describe API::Projects do jobs_enabled: false, merge_requests_enabled: false, wiki_enabled: false, - collapse_outdated_diff_comments: false, + resolve_outdated_diff_discussions: false, only_allow_merge_if_pipeline_succeeds: false, request_access_enabled: true, only_allow_merge_if_all_discussions_are_resolved: false, @@ -478,16 +478,16 @@ describe API::Projects do expect(json_response['avatar_url']).to eq("http://localhost/uploads/-/system/project/avatar/#{project_id}/banana_sample.gif") end - it 'sets a project as allowing outdated diff comments to collapse regardless of discussion resolution' do - project = attributes_for(:project, { collapse_outdated_diff_comments: false }) + it 'sets a project as allowing outdated diff discussions to automatically resolve' do + project = attributes_for(:project, { resolve_outdated_diff_discussions: false }) post api('/projects', user), project - expect(json_response['collapse_outdated_diff_comments']).to be_falsey + expect(json_response['resolve_outdated_diff_discussions']).to be_falsey end - it 'sets a project as allowing outdated diff comments to collapse if collapse_outdated_diff_comments' do - project = attributes_for(:project, { collapse_outdated_diff_comments: true }) + it 'sets a project as allowing outdated diff discussions to automatically resolve if resolve_outdated_diff_discussions' do + project = attributes_for(:project, { resolve_outdated_diff_discussions: true }) post api('/projects', user), project - expect(json_response['collapse_outdated_diff_comments']).to be_truthy + expect(json_response['resolve_outdated_diff_discussions']).to be_truthy end it 'sets a project as allowing merge even if build fails' do @@ -655,20 +655,20 @@ describe API::Projects do expect(json_response['visibility']).to eq('private') end - it 'sets a project as allowing outdated diff comments to collapse regardless of discussion resolution' do - project = attributes_for(:project, { collapse_outdated_diff_comments: false }) + it 'sets a project as allowing outdated diff discussions to automatically resolve' do + project = attributes_for(:project, { resolve_outdated_diff_discussions: false }) post api("/projects/user/#{user.id}", admin), project - expect(json_response['collapse_outdated_diff_comments']).to be_falsey + expect(json_response['resolve_outdated_diff_discussions']).to be_falsey end - it 'sets a project as allowing outdated diff comments to collapse only if collapse_outdated_diff_comments' do - project = attributes_for(:project, { collapse_outdated_diff_comments: true }) + it 'sets a project as allowing outdated diff discussions to automatically resolve only if resolve_outdated_diff_discussions' do + project = attributes_for(:project, { resolve_outdated_diff_discussions: true }) post api("/projects/user/#{user.id}", admin), project - expect(json_response['collapse_outdated_diff_comments']).to be_truthy + expect(json_response['resolve_outdated_diff_discussions']).to be_truthy end it 'sets a project as allowing merge even if build fails' do @@ -761,7 +761,7 @@ describe API::Projects do expect(json_response['wiki_enabled']).to be_present expect(json_response['jobs_enabled']).to be_present expect(json_response['snippets_enabled']).to be_present - expect(json_response['collapse_outdated_diff_comments']).to eq(project.collapse_outdated_diff_comments) + expect(json_response['resolve_outdated_diff_discussions']).to eq(project.resolve_outdated_diff_discussions) expect(json_response['container_registry_enabled']).to be_present expect(json_response['created_at']).to be_present expect(json_response['last_activity_at']).to be_present diff --git a/spec/requests/api/v3/projects_spec.rb b/spec/requests/api/v3/projects_spec.rb index bbe56c972bd..f8dd5f960e8 100644 --- a/spec/requests/api/v3/projects_spec.rb +++ b/spec/requests/api/v3/projects_spec.rb @@ -394,7 +394,7 @@ describe API::V3::Projects do issues_enabled: false, merge_requests_enabled: false, wiki_enabled: false, - collapse_outdated_diff_comments: false, + resolve_outdated_diff_discussions: false, only_allow_merge_if_build_succeeds: false, request_access_enabled: true, only_allow_merge_if_all_discussions_are_resolved: false @@ -456,16 +456,16 @@ describe API::V3::Projects do expect(json_response['visibility_level']).to eq(Gitlab::VisibilityLevel::PRIVATE) end - it 'sets a project as allowing outdated diff comments to collapse regardless of discussion resolution' do - project = attributes_for(:project, { collapse_outdated_diff_comments: false }) + it 'sets a project as allowing outdated diff discussions to automatically resolve' do + project = attributes_for(:project, { resolve_outdated_diff_discussions: false }) post v3_api('/projects', user), project - expect(json_response['collapse_outdated_diff_comments']).to be_falsey + expect(json_response['resolve_outdated_diff_discussions']).to be_falsey end - it 'sets a project as allowing outdated diff comments to collapse if collapse_outdated_diff_comments' do - project = attributes_for(:project, { collapse_outdated_diff_comments: true }) + it 'sets a project as allowing outdated diff discussions to automatically resolve if resolve_outdated_diff_discussions' do + project = attributes_for(:project, { resolve_outdated_diff_discussions: true }) post v3_api('/projects', user), project - expect(json_response['collapse_outdated_diff_comments']).to be_truthy + expect(json_response['resolve_outdated_diff_discussions']).to be_truthy end it 'sets a project as allowing merge even if build fails' do @@ -612,16 +612,16 @@ describe API::V3::Projects do expect(json_response['visibility_level']).to eq(Gitlab::VisibilityLevel::PRIVATE) end - it 'sets a project as allowing outdated diff comments to collapse regardless of discussion resolution' do - project = attributes_for(:project, { collapse_outdated_diff_comments: false }) + it 'sets a project as allowing outdated diff discussions to automatically resolve' do + project = attributes_for(:project, { resolve_outdated_diff_discussions: false }) post v3_api("/projects/user/#{user.id}", admin), project - expect(json_response['collapse_outdated_diff_comments']).to be_falsey + expect(json_response['resolve_outdated_diff_discussions']).to be_falsey end - it 'sets a project as allowing outdated diff comments to collapse only if collapse_outdated_diff_comments' do - project = attributes_for(:project, { collapse_outdated_diff_comments: true }) + it 'sets a project as allowing outdated diff discussions to automatically resolve only if resolve_outdated_diff_discussions' do + project = attributes_for(:project, { resolve_outdated_diff_discussions: true }) post v3_api("/projects/user/#{user.id}", admin), project - expect(json_response['collapse_outdated_diff_comments']).to be_truthy + expect(json_response['resolve_outdated_diff_discussions']).to be_truthy end it 'sets a project as allowing merge even if build fails' do @@ -712,7 +712,7 @@ describe API::V3::Projects do expect(json_response['wiki_enabled']).to be_present expect(json_response['builds_enabled']).to be_present expect(json_response['snippets_enabled']).to be_present - expect(json_response['collapse_outdated_diff_comments']).to eq(project.collapse_outdated_diff_comments) + expect(json_response['resolve_outdated_diff_discussions']).to eq(project.resolve_outdated_diff_discussions) expect(json_response['container_registry_enabled']).to be_present expect(json_response['created_at']).to be_present expect(json_response['last_activity_at']).to be_present |