summaryrefslogtreecommitdiff
path: root/spec/models/project_ci_cd_setting_spec.rb
blob: 4aa6202816969c9bbcdcd2fc7ec8013daa5fa9a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# 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