diff options
author | Manoj MJ <mmj@gitlab.com> | 2019-06-19 10:08:56 +0300 |
---|---|---|
committer | James Lopez <james@gitlab.com> | 2019-06-19 10:08:56 +0300 |
commit | 53b17f030161ba2afade8fe3d41b849a7fa41a89 (patch) | |
tree | 9f911580f4bc5d78cb66ffe7e16d1f77f7d23f64 /spec/features/tags | |
parent | 69e1bd389f3cb04d451900f981be646462ffd039 (diff) |
Add documentation and tests
This commit adds
- feature specs
- to test the ability of a user with "developer" permission
to delete tags in repositories.
- documentation
Diffstat (limited to 'spec/features/tags')
-rw-r--r-- | spec/features/tags/developer_creates_tag_spec.rb (renamed from spec/features/tags/master_creates_tag_spec.rb) | 7 | ||||
-rw-r--r-- | spec/features/tags/developer_deletes_tag_spec.rb (renamed from spec/features/tags/master_deletes_tag_spec.rb) | 7 | ||||
-rw-r--r-- | spec/features/tags/developer_updates_tag_spec.rb (renamed from spec/features/tags/master_updates_tag_spec.rb) | 7 | ||||
-rw-r--r-- | spec/features/tags/developer_views_tags_spec.rb (renamed from spec/features/tags/master_views_tags_spec.rb) | 7 |
4 files changed, 16 insertions, 12 deletions
diff --git a/spec/features/tags/master_creates_tag_spec.rb b/spec/features/tags/developer_creates_tag_spec.rb index f80ddd050d7..b2ad7ed8f3f 100644 --- a/spec/features/tags/master_creates_tag_spec.rb +++ b/spec/features/tags/developer_creates_tag_spec.rb @@ -1,11 +1,12 @@ require 'spec_helper' -describe 'Maintainer creates tag' do +describe 'Developer creates tag' do let(:user) { create(:user) } - let(:project) { create(:project, :repository, namespace: user.namespace) } + let(:group) { create(:group) } + let(:project) { create(:project, :repository, namespace: group) } before do - project.add_maintainer(user) + project.add_developer(user) sign_in(user) end diff --git a/spec/features/tags/master_deletes_tag_spec.rb b/spec/features/tags/developer_deletes_tag_spec.rb index bdbbe645779..dc4c7a4fb0a 100644 --- a/spec/features/tags/master_deletes_tag_spec.rb +++ b/spec/features/tags/developer_deletes_tag_spec.rb @@ -1,11 +1,12 @@ require 'spec_helper' -describe 'Maintainer deletes tag' do +describe 'Developer deletes tag' do let(:user) { create(:user) } - let(:project) { create(:project, :repository, namespace: user.namespace) } + let(:group) { create(:group) } + let(:project) { create(:project, :repository, namespace: group) } before do - project.add_maintainer(user) + project.add_developer(user) sign_in(user) visit project_tags_path(project) end diff --git a/spec/features/tags/master_updates_tag_spec.rb b/spec/features/tags/developer_updates_tag_spec.rb index d8b5b3c4cc4..1e11fc9e5d5 100644 --- a/spec/features/tags/master_updates_tag_spec.rb +++ b/spec/features/tags/developer_updates_tag_spec.rb @@ -1,11 +1,12 @@ require 'spec_helper' -describe 'Maintainer updates tag' do +describe 'Developer updates tag' do let(:user) { create(:user) } - let(:project) { create(:project, :repository, namespace: user.namespace) } + let(:group) { create(:group) } + let(:project) { create(:project, :repository, namespace: group) } before do - project.add_maintainer(user) + project.add_developer(user) sign_in(user) visit project_tags_path(project) end diff --git a/spec/features/tags/master_views_tags_spec.rb b/spec/features/tags/developer_views_tags_spec.rb index 36cfeb5ed84..09e644c6b97 100644 --- a/spec/features/tags/master_views_tags_spec.rb +++ b/spec/features/tags/developer_views_tags_spec.rb @@ -1,7 +1,8 @@ require 'spec_helper' -describe 'Maintainer views tags' do +describe 'Developer views tags' do let(:user) { create(:user) } + let(:group) { create(:group) } before do project.add_maintainer(user) @@ -9,7 +10,7 @@ describe 'Maintainer views tags' do end context 'when project has no tags' do - let(:project) { create(:project_empty_repo) } + let(:project) { create(:project_empty_repo, namespace: group) } before do visit project_path(project) @@ -25,7 +26,7 @@ describe 'Maintainer views tags' do end context 'when project has tags' do - let(:project) { create(:project, :repository, namespace: user.namespace) } + let(:project) { create(:project, :repository, namespace: group) } let(:repository) { project.repository } before do |