debian-mirror-gitlab/spec/views/admin/application_settings/ci_cd.html.haml_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
1 KiB
Ruby
Raw Normal View History

2021-09-30 23:02:18 +05:30
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'admin/application_settings/ci_cd.html.haml' do
let_it_be(:app_settings) { build(:application_setting) }
let_it_be(:user) { create(:admin) }
let_it_be(:default_plan_limits) { create(:plan_limits, :default_plan, :with_package_file_sizes) }
before do
assign(:application_setting, app_settings)
assign(:plans, [default_plan_limits.plan])
allow(view).to receive(:current_user).and_return(user)
end
2023-05-27 22:25:52 +05:30
describe 'CI CD Runners' do
2022-11-25 23:54:43 +05:30
it 'has the setting section' do
render
2021-09-30 23:02:18 +05:30
2022-11-25 23:54:43 +05:30
expect(rendered).to have_css("#js-runner-settings")
2021-09-30 23:02:18 +05:30
end
2022-11-25 23:54:43 +05:30
it 'renders the correct setting section content' do
render
2021-09-30 23:02:18 +05:30
2022-11-25 23:54:43 +05:30
expect(rendered).to have_content("Runner registration")
2023-04-23 21:23:45 +05:30
expect(rendered).to have_content(s_("Runners|If both settings are disabled, new runners cannot be registered."))
2023-05-27 22:25:52 +05:30
expect(rendered).to have_content(
s_("Runners|Fetch GitLab Runner release version data from GitLab.com")
)
2021-09-30 23:02:18 +05:30
end
end
end