diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-04-07 18:15:28 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-04-07 18:15:28 +0300 |
commit | d5201119ee2a139c18b51babd80f6c6490f90b6e (patch) | |
tree | 9e2f1ba98c51a0518b8c5b98ad28ca8cac3b9b65 | |
parent | 344001d7384ec227fdf18cc87b62981f18c7c580 (diff) |
Fix test failures
-rw-r--r-- | app/models/ci/trigger_schedule.rb | 5 | ||||
-rw-r--r-- | app/views/projects/triggers/_form.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/triggers/_trigger.html.haml | 2 | ||||
-rw-r--r-- | spec/features/triggers_spec.rb | 1 |
4 files changed, 6 insertions, 4 deletions
diff --git a/app/models/ci/trigger_schedule.rb b/app/models/ci/trigger_schedule.rb index c9a16643f32..012a18eb439 100644 --- a/app/models/ci/trigger_schedule.rb +++ b/app/models/ci/trigger_schedule.rb @@ -31,8 +31,9 @@ module Ci update_attribute(:next_run_at, nil) # update without validation end - def real_next_run(worker_cron: Settings.cron_jobs['trigger_schedule_worker']['cron'], - worker_time_zone: Time.zone.name) + def real_next_run( + worker_cron: Settings.cron_jobs['trigger_schedule_worker']['cron'], + worker_time_zone: Time.zone.name) Gitlab::Ci::CronParser.new(worker_cron, worker_time_zone) .next_time_from(next_run_at) end diff --git a/app/views/projects/triggers/_form.html.haml b/app/views/projects/triggers/_form.html.haml index 8ec2f05e3d6..8582bcbb8cc 100644 --- a/app/views/projects/triggers/_form.html.haml +++ b/app/views/projects/triggers/_form.html.haml @@ -18,7 +18,7 @@ = schedule_fields.check_box :active %strong Schedule trigger (experimental) .help-block - If checked, this trigger will be executed periodically according to `Cron` and `Timezone`. + If checked, this trigger will be executed periodically according to cron and timezone. = link_to icon('question-circle'), help_page_path('ci/triggers', anchor: 'schedule') .form-group = schedule_fields.label :cron, "Cron", class: "label-light" diff --git a/app/views/projects/triggers/_trigger.html.haml b/app/views/projects/triggers/_trigger.html.haml index ca4549fc557..ebd91a8e2af 100644 --- a/app/views/projects/triggers/_trigger.html.haml +++ b/app/views/projects/triggers/_trigger.html.haml @@ -33,7 +33,7 @@ - if trigger.trigger_schedule&.active? = trigger.trigger_schedule.real_next_run - else - None + Never %td.text-right.trigger-actions - take_ownership_confirmation = "By taking ownership you will bind this trigger to your user account. With this the trigger will have access to all your projects as if it was you. Are you sure?" diff --git a/spec/features/triggers_spec.rb b/spec/features/triggers_spec.rb index 10bfb9098c7..906842583e4 100644 --- a/spec/features/triggers_spec.rb +++ b/spec/features/triggers_spec.rb @@ -120,6 +120,7 @@ feature 'Triggers', feature: true, js: true do visit edit_namespace_project_trigger_path(@project.namespace, @project, trigger) checkbox = find_field('trigger_trigger_schedule_attributes_active') + expect(checkbox).not_to be_checked end end |