Fix specs for Projects::NotificationSettingsController

parent aabb466e
...@@ -8,34 +8,6 @@ describe Projects::NotificationSettingsController do ...@@ -8,34 +8,6 @@ describe Projects::NotificationSettingsController do
project.team << [user, :developer] project.team << [user, :developer]
end end
describe '#create' do
context 'when not authorized' do
it 'redirects to sign in page' do
post :create,
namespace_id: project.namespace.to_param,
project_id: project.to_param,
notification_setting: { level: :participating }
expect(response).to redirect_to(new_user_session_path)
end
end
context 'when authorized' do
before do
sign_in(user)
end
it 'returns success' do
post :create,
namespace_id: project.namespace.to_param,
project_id: project.to_param,
notification_setting: { level: :participating }
expect(response.status).to eq 200
end
end
end
describe '#update' do describe '#update' do
context 'when not authorized' do context 'when not authorized' do
it 'redirects to sign in page' do it 'redirects to sign in page' 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