Commit df044542 authored by John Cai's avatar John Cai

Fix project set_repository_writable!

parent 4a5b3707
......@@ -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