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 ...@@ -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
......
...@@ -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
......
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