diff --git a/lib/travis/api/v3/renderer/cron.rb b/lib/travis/api/v3/renderer/cron.rb index fdad9263..95419867 100644 --- a/lib/travis/api/v3/renderer/cron.rb +++ b/lib/travis/api/v3/renderer/cron.rb @@ -3,7 +3,7 @@ require 'travis/api/v3/renderer/model_renderer' module Travis::API::V3 class Renderer::Cron < Renderer::ModelRenderer representation(:minimal, :id) - representation(:standard, :id, :repository, :branch, :interval, :disable_by_build, :next_enqueuing) + representation(:standard, :id, :repository, :branch, :interval, :disable_by_build, :next_enqueuing, :created_at) def repository model.branch.repository diff --git a/spec/v3/services/cron/create_spec.rb b/spec/v3/services/cron/create_spec.rb index dc578e80..859e6a27 100644 --- a/spec/v3/services/cron/create_spec.rb +++ b/spec/v3/services/cron/create_spec.rb @@ -64,7 +64,8 @@ describe Travis::API::V3::Services::Cron::Create do "name" => "#{branch.name}" }, "interval" => "monthly", "disable_by_build" => false, - "next_enqueuing" => current_cron.next_enqueuing.strftime('%Y-%m-%dT%H:%M:%SZ') + "next_enqueuing" => current_cron.next_enqueuing.strftime('%Y-%m-%dT%H:%M:%SZ'), + "created_at" => current_cron.created_at.strftime('%Y-%m-%dT%H:%M:%SZ') }} end diff --git a/spec/v3/services/cron/delete_spec.rb b/spec/v3/services/cron/delete_spec.rb index 601d7bb9..54a3b056 100644 --- a/spec/v3/services/cron/delete_spec.rb +++ b/spec/v3/services/cron/delete_spec.rb @@ -52,7 +52,8 @@ describe Travis::API::V3::Services::Cron::Delete do "name" => branch.name }, "interval" => "daily", "disable_by_build" => true, - "next_enqueuing" => cron.next_enqueuing.strftime('%Y-%m-%dT%H:%M:%SZ') + "next_enqueuing" => cron.next_enqueuing.strftime('%Y-%m-%dT%H:%M:%SZ'), + "created_at" => cron.created_at.strftime('%Y-%m-%dT%H:%M:%SZ') }} end diff --git a/spec/v3/services/cron/find_spec.rb b/spec/v3/services/cron/find_spec.rb index 8ae7f2c6..e75e15c0 100644 --- a/spec/v3/services/cron/find_spec.rb +++ b/spec/v3/services/cron/find_spec.rb @@ -46,8 +46,9 @@ describe Travis::API::V3::Services::Cron::Find do "@representation" => "minimal", "name" => branch.name }, "interval" => "daily", - "disable_by_build" => true, - "next_enqueuing" => cron.next_enqueuing.strftime('%Y-%m-%dT%H:%M:%SZ') + "disable_by_build" => true, + "next_enqueuing" => cron.next_enqueuing.strftime('%Y-%m-%dT%H:%M:%SZ'), + "created_at" => cron.created_at.strftime('%Y-%m-%dT%H:%M:%SZ') }} end @@ -105,8 +106,9 @@ describe Travis::API::V3::Services::Cron::Find do "@representation" => "minimal", "name" => branch.name }, "interval" => "daily", - "disable_by_build" => true, - "next_enqueuing" => cron.next_enqueuing.strftime('%Y-%m-%dT%H:%M:%SZ') + "disable_by_build" => true, + "next_enqueuing" => cron.next_enqueuing.strftime('%Y-%m-%dT%H:%M:%SZ'), + "created_at" => cron.created_at.strftime('%Y-%m-%dT%H:%M:%SZ') }} end diff --git a/spec/v3/services/cron/for_branch_spec.rb b/spec/v3/services/cron/for_branch_spec.rb index 32b0f76b..c5509074 100644 --- a/spec/v3/services/cron/for_branch_spec.rb +++ b/spec/v3/services/cron/for_branch_spec.rb @@ -47,8 +47,9 @@ describe Travis::API::V3::Services::Cron::ForBranch do "@representation" => "minimal", "name" => branch.name }, "interval" => "daily", - "disable_by_build" => true, - "next_enqueuing" => cron.next_enqueuing.strftime('%Y-%m-%dT%H:%M:%SZ') + "disable_by_build" => true, + "next_enqueuing" => cron.next_enqueuing.strftime('%Y-%m-%dT%H:%M:%SZ'), + "created_at" => cron.created_at.strftime('%Y-%m-%dT%H:%M:%SZ') }} end diff --git a/spec/v3/services/crons/for_repository_spec.rb b/spec/v3/services/crons/for_repository_spec.rb index 05e37102..f81b8e7b 100644 --- a/spec/v3/services/crons/for_repository_spec.rb +++ b/spec/v3/services/crons/for_repository_spec.rb @@ -68,7 +68,8 @@ describe Travis::API::V3::Services::Crons::ForRepository do "name" => "#{branch.name}" }, "interval" => "daily", "disable_by_build" => true, - "next_enqueuing" => cron.next_enqueuing.strftime('%Y-%m-%dT%H:%M:%SZ') + "next_enqueuing" => cron.next_enqueuing.strftime('%Y-%m-%dT%H:%M:%SZ'), + "created_at" => cron.created_at.strftime('%Y-%m-%dT%H:%M:%SZ') } ] }}