From 799d757625af609149b15dcf6fe69b1cec3c2d8c Mon Sep 17 00:00:00 2001 From: Christopher Weyand Date: Mon, 30 May 2016 11:26:06 +0200 Subject: [PATCH] cron representation change tests --- spec/v3/services/cron/create_spec.rb | 3 ++- spec/v3/services/cron/delete_spec.rb | 3 ++- spec/v3/services/cron/find_spec.rb | 10 ++++++---- spec/v3/services/cron/for_branch_spec.rb | 5 +++-- spec/v3/services/crons/for_repository_spec.rb | 3 ++- 5 files changed, 15 insertions(+), 9 deletions(-) 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') } ] }}