Commit f2a1bd6c authored by Bob Van Landuyt's avatar Bob Van Landuyt

Move the push_to_empty_repo to the user_access spec

parent 742dd303
require 'spec_helper'
describe Gitlab::UserAccess do
include ExternalAuthorizationServiceHelpers
let(:user) { create(:user) }
let(:access) { described_class.new(user, project: project) }
describe '#can_push_to_branch?' do
describe 'push to empty project' do
let(:project) { create(:project_empty_repo) }
it 'returns false when the external service denies access' do
project.add_master(user)
external_service_deny_access(user, project)
expect(access.can_push_to_branch?('master')).to be_falsey
end
end
end
end
...@@ -1310,17 +1310,6 @@ describe Project do ...@@ -1310,17 +1310,6 @@ describe Project do
end end
end end
describe '#user_can_push_to_empty_repo?' do
it 'returns false when the external service denies access' do
user = create(:user)
project = create(:project)
project.add_master(user)
external_service_deny_access(user, project)
expect(project.user_can_push_to_empty_repo?(user)).to be_falsey
end
end
describe 'project import state transitions' do describe 'project import state transitions' do
context 'state transition: [:started] => [:finished]' do context 'state transition: [:started] => [:finished]' do
context 'elasticsearch indexing disabled' do context 'elasticsearch indexing disabled' 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