Commit b118e4dd authored by Rajendra Kadam's avatar Rajendra Kadam

Add spec for developer role and asser for changed attribute

parent d1e97655
......@@ -112,6 +112,24 @@ describe API::ErrorTracking do
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
it 'returns 404' do
make_request
......
......@@ -169,6 +169,13 @@ describe Projects::Operations::UpdateService do
.from(false)
.to(true)
end
it 'only updates enabled attribute' do
result
expect(project.error_tracking_setting.previous_changes.keys)
.to contain_exactly('enabled')
end
end
context 'without setting' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment