summaryrefslogtreecommitdiff
path: root/spec/db/production/settings.rb
blob: 3cbb173c4cce5f1e37653bfea907a779858f6399 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require 'spec_helper'

describe 'seed production settings', lib: true do
  include StubENV

  context 'GITLAB_SHARED_RUNNERS_REGISTRATION_TOKEN is set in the environment' do
    before do
      stub_env('GITLAB_SHARED_RUNNERS_REGISTRATION_TOKEN', '013456789')
    end

    it 'writes the token to the database' do
      load(File.join(__dir__, '../../../db/fixtures/production/010_settings.rb'))
      expect(ApplicationSetting.current.runners_registration_token).to eq('013456789')
    end
  end
end