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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
b118e4dd
Commit
b118e4dd
authored
Feb 03, 2020
by
Rajendra Kadam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add spec for developer role and asser for changed attribute
parent
d1e97655
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
spec/requests/api/error_tracking_spec.rb
spec/requests/api/error_tracking_spec.rb
+18
-0
spec/services/projects/operations/update_service_spec.rb
spec/services/projects/operations/update_service_spec.rb
+7
-0
No files found.
spec/requests/api/error_tracking_spec.rb
View file @
b118e4dd
...
@@ -112,6 +112,24 @@ describe API::ErrorTracking do
...
@@ -112,6 +112,24 @@ describe API::ErrorTracking do
end
end
end
end
context
'when authenticated as developer'
do
before
do
project
.
add_developer
(
user
)
end
it
'returns 403'
do
make_request
expect
(
response
).
to
have_gitlab_http_status
(
:forbidden
)
end
it
'returns 403 for update request'
do
make_patch_request
(
true
)
expect
(
response
).
to
have_gitlab_http_status
(
:forbidden
)
end
end
context
'when authenticated as non-member'
do
context
'when authenticated as non-member'
do
it
'returns 404'
do
it
'returns 404'
do
make_request
make_request
...
...
spec/services/projects/operations/update_service_spec.rb
View file @
b118e4dd
...
@@ -169,6 +169,13 @@ describe Projects::Operations::UpdateService do
...
@@ -169,6 +169,13 @@ describe Projects::Operations::UpdateService do
.
from
(
false
)
.
from
(
false
)
.
to
(
true
)
.
to
(
true
)
end
end
it
'only updates enabled attribute'
do
result
expect
(
project
.
error_tracking_setting
.
previous_changes
.
keys
)
.
to
contain_exactly
(
'enabled'
)
end
end
end
context
'without setting'
do
context
'without setting'
do
...
...
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