GitLab steht Mittwoch, den 08. Juli, zwischen 09:00 und 13:00 Uhr aufgrund von Wartungsarbeiten nicht zur Verfügung.

Commit a8a02387 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'jc-fix-set-project-writable' into 'master'

Fix method to mark a project repository as writable

See merge request gitlab-org/gitlab-ce!25546
parents aa868886 df044542
......@@ -1838,7 +1838,7 @@ class Project < ActiveRecord::Base
# Set repository as writable again
def set_repository_writable!
with_lock do
update_column(repository_read_only, false)
update_column(:repository_read_only, false)
end
end
......
---
title: Fix method to mark a project repository as writable
merge_request: 25546
author:
type: fixed
......@@ -2511,6 +2511,16 @@ describe Project do
end
end
describe '#set_repository_writable!' do
it 'sets repository_read_only to false' do
project = create(:project, :read_only)
expect { project.set_repository_writable! }
.to change(project, :repository_read_only)
.from(true).to(false)
end
end
describe '#pushes_since_gc' do
let(:project) { create(:project) }
......
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