2019-10-17 02:07:30 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-01-16 16:13:14 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'Groups (JavaScript fixtures)', type: :controller do
|
|
|
|
include JavaScriptFixturesHelpers
|
|
|
|
|
|
|
|
let(:admin) { create(:admin) }
|
2019-02-21 11:54:28 -05:00
|
|
|
let(:group) { create(:group, name: 'frontend-fixtures-group', runners_token: 'runnerstoken:intabulasreferre')}
|
2018-01-16 16:13:14 -05:00
|
|
|
|
|
|
|
render_views
|
|
|
|
|
|
|
|
before(:all) do
|
|
|
|
clean_frontend_fixtures('groups/')
|
|
|
|
end
|
|
|
|
|
|
|
|
before do
|
2020-02-21 01:08:58 -05:00
|
|
|
stub_feature_flags(new_variables_ui: false)
|
2018-07-11 10:36:08 -04:00
|
|
|
group.add_maintainer(admin)
|
2018-01-16 16:13:14 -05:00
|
|
|
sign_in(admin)
|
|
|
|
end
|
|
|
|
|
2018-10-15 09:36:19 -04:00
|
|
|
describe GroupsController, '(JavaScript fixtures)', type: :controller do
|
2019-04-21 06:58:07 -04:00
|
|
|
it 'groups/edit.html' do
|
2018-12-19 14:50:20 -05:00
|
|
|
get :edit, params: { id: group }
|
2018-10-15 09:36:19 -04:00
|
|
|
|
2019-07-17 18:15:53 -04:00
|
|
|
expect(response).to be_successful
|
2018-10-15 09:36:19 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2018-01-16 16:13:14 -05:00
|
|
|
describe Groups::Settings::CiCdController, '(JavaScript fixtures)', type: :controller do
|
2019-04-21 06:58:07 -04:00
|
|
|
it 'groups/ci_cd_settings.html' do
|
2018-12-19 14:50:20 -05:00
|
|
|
get :show, params: { group_id: group }
|
2018-01-16 16:13:14 -05:00
|
|
|
|
2019-07-17 18:15:53 -04:00
|
|
|
expect(response).to be_successful
|
2018-01-16 16:13:14 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|