Commit 18c3f93b authored by Oswaldo Ferreira's avatar Oswaldo Ferreira

Ensure column can hold 8 byte values

parent 2a2e91f9
......@@ -176,4 +176,14 @@ describe ApplicationSetting, models: true do
expect(setting.domain_blacklist).to contain_exactly('example.com', 'test.com', 'foo.bar')
end
end
describe '#repository_size_limit column' do
it 'support values up to 8 exabytes' do
setting.update_column(:repository_size_limit, 8.exabytes - 1)
setting.reload
expect(setting.repository_size_limit).to eql(8.exabytes - 1)
end
end
end
......@@ -100,7 +100,18 @@ describe Group, models: true do
it 'returns the value set locally' do
group.update_attribute(:repository_size_limit, 75)
expect(group.actual_size_limit).to eq(75)
expect(group.actual_size_limit).to eq(75.megabytes)
end
end
describe '#repository_size_limit column' do
it 'support values up to 8 exabytes' do
group = create(:group)
group.update_column(:repository_size_limit, 8.exabytes - 1)
group.reload
expect(group.repository_size_limit).to eql(8.exabytes - 1)
end
end
end
......@@ -623,6 +623,17 @@ describe Project, models: true do
end
end
describe '#repository_size_limit column' do
it 'support values up to 8 exabytes' do
project = create(:empty_project)
project.update_column(:repository_size_limit, 8.exabytes - 1)
project.reload
expect(project.repository_size_limit).to eql(8.exabytes - 1)
end
end
describe '#default_issues_tracker?' do
it "is true if used internal tracker" do
project = build(:empty_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