Merge pull request #266 from HPI-BP2015H/cron-time
return created_at of cron
This commit is contained in:
commit
9df4dc02cf
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -47,7 +47,8 @@ describe Travis::API::V3::Services::Cron::Find 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
|
||||
|
||||
|
@ -106,7 +107,8 @@ describe Travis::API::V3::Services::Cron::Find 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
|
||||
|
||||
|
|
|
@ -48,7 +48,8 @@ describe Travis::API::V3::Services::Cron::ForBranch 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
|
||||
|
||||
|
|
|
@ -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')
|
||||
}
|
||||
]
|
||||
}}
|
||||
|
|
Loading…
Reference in New Issue
Block a user