392c411bdc
This model and the corresponding table will be used for storing settings specific to CI/CD, starting with the "group_runners_enabled" boolean. The model is called ProjectCiCdSetting and not ProjectCiCdSettings. The project exporter doesn't like plural model names as it uses "classify" which turns those into singular (so "ProjectCiCdSettings" becomes "ProjectCiCdSetting", producing an error if said class is undefined). The initial work in this commit was done by Dylan Griffith, with most of the migration work being done by Yorick Peterse.
24 lines
483 B
Ruby
24 lines
483 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'spec_helper'
|
|
|
|
describe ProjectCiCdSetting do
|
|
describe '.available?' do
|
|
before do
|
|
described_class.reset_column_information
|
|
end
|
|
|
|
it 'returns true' do
|
|
expect(described_class).to be_available
|
|
end
|
|
|
|
it 'memoizes the schema version' do
|
|
expect(ActiveRecord::Migrator)
|
|
.to receive(:current_version)
|
|
.and_call_original
|
|
.once
|
|
|
|
2.times { described_class.available? }
|
|
end
|
|
end
|
|
end
|