Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
2ec7cfc9
Commit
2ec7cfc9
authored
Aug 20, 2017
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add spec for deleting protected tags
parent
84336b84
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
spec/controllers/projects/protected_tags_controller_spec.rb
spec/controllers/projects/protected_tags_controller_spec.rb
+17
-0
No files found.
spec/controllers/projects/protected_tags_controller_spec.rb
View file @
2ec7cfc9
...
@@ -8,4 +8,21 @@ describe Projects::ProtectedTagsController do
...
@@ -8,4 +8,21 @@ describe Projects::ProtectedTagsController do
get
(
:index
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
)
get
(
:index
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
)
end
end
end
end
describe
"DELETE #destroy"
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:protected_tag
)
{
create
(
:protected_tag
,
:developers_can_create
,
project:
project
)
}
let
(
:user
)
{
create
(
:user
)
}
before
do
project
.
add_master
(
user
)
sign_in
(
user
)
end
it
"deletes the protected tag"
do
delete
(
:destroy
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
,
id:
protected_tag
.
id
)
expect
{
ProtectedTag
.
find
(
protected_tag
.
id
)
}.
to
raise_error
(
ActiveRecord
::
RecordNotFound
)
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment