diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /spec/frontend/fixtures/freeze_period.rb | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'spec/frontend/fixtures/freeze_period.rb')
-rw-r--r-- | spec/frontend/fixtures/freeze_period.rb | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/spec/frontend/fixtures/freeze_period.rb b/spec/frontend/fixtures/freeze_period.rb new file mode 100644 index 00000000000..7695dbc2e8f --- /dev/null +++ b/spec/frontend/fixtures/freeze_period.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe 'Freeze Periods (JavaScript fixtures)' do + include JavaScriptFixturesHelpers + include Ci::PipelineSchedulesHelper + + let_it_be(:admin) { create(:admin) } + let_it_be(:project) { create(:project, :repository, path: 'freeze-periods-project') } + + before(:all) do + clean_frontend_fixtures('api/freeze-periods/') + end + + after(:all) do + remove_repository(project) + end + + describe API::FreezePeriods, '(JavaScript fixtures)', type: :request do + include ApiHelpers + + it 'api/freeze-periods/freeze_periods.json' do + create(:ci_freeze_period, project: project, freeze_start: '5 4 * * *', freeze_end: '5 9 * 8 *', cron_timezone: 'America/New_York') + create(:ci_freeze_period, project: project, freeze_start: '0 12 * * 1-5', freeze_end: '0 1 5 * *', cron_timezone: 'Etc/UTC') + create(:ci_freeze_period, project: project, freeze_start: '0 12 * * 1-5', freeze_end: '0 16 * * 6', cron_timezone: 'Europe/Berlin') + + get api("/projects/#{project.id}/freeze_periods", admin) + + expect(response).to be_successful + end + end + + describe Ci::PipelineSchedulesHelper, '(JavaScript fixtures)' do + let(:response) { timezone_data.to_json } + + it 'api/freeze-periods/timezone_data.json' do + end + end +end |