summaryrefslogtreecommitdiff
path: root/spec/features/triggers_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/triggers_spec.rb')
-rw-r--r--spec/features/triggers_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/features/triggers_spec.rb b/spec/features/triggers_spec.rb
index 81fa2de1cc3..783f330221c 100644
--- a/spec/features/triggers_spec.rb
+++ b/spec/features/triggers_spec.rb
@@ -104,6 +104,24 @@ feature 'Triggers', feature: true, js: true do
expect(page).to have_content 'The form contains the following errors'
end
+
+ context 'when GitLab time_zone is ActiveSupport::TimeZone format' do
+ before do
+ allow(Time).to receive(:zone)
+ .and_return(ActiveSupport::TimeZone['Eastern Time (US & Canada)'])
+ end
+
+ scenario 'do fill form with valid data and save' do
+ find('#trigger_trigger_schedule_attributes_active').click
+ fill_in 'trigger_trigger_schedule_attributes_cron', with: '1 * * * *'
+ fill_in 'trigger_trigger_schedule_attributes_cron_timezone', with: 'UTC'
+ fill_in 'trigger_trigger_schedule_attributes_ref', with: 'master'
+ click_button 'Save trigger'
+
+ expect(page.find('.flash-notice'))
+ .to have_content 'Trigger was successfully updated.'
+ end
+ end
end
context 'disabling schedule' do