Skip to content

Commit

Permalink
Merge pull request #170 from jonsugar/main
Browse files Browse the repository at this point in the history
Fix test failing due to timezone weirdness.
  • Loading branch information
mattstauffer authored Dec 4, 2021
2 parents 42f3a4a + 63f0cb3 commit 347ac20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/Actions/UpgradeSavedConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function upgrade(string $savedConfiguration, array $removedConfigurationK
return implode(PHP_EOL, [
$this->commentRemovedConfiguration($savedConfiguration, $removedConfigurationKeys),
"\n# ------------------------------------------------------------------------------",
'# ' . Carbon::now()->format('j-M-Y g:i a') . ' (auto-generated by Lambo):',
'# ' . Carbon::now(config('app.timezone'))->format('j-M-Y g:i a') . ' (auto-generated by Lambo):',
'# ------------------------------------------------------------------------------',
$this->summarizeComments(),
$this->addNewConfiguration($newConfiguration),
Expand Down
4 changes: 2 additions & 2 deletions tests/Feature/UpgradeSavedConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class UpgradeSavedConfigurationTest extends TestCase
/** @test */
function it_upgrades_saved_configuration()
{
$this->travelTo(Carbon::parse('17-Jul-2016 20:51:08', 'America/New_York'));
$this->travelTo(Carbon::parse('01-Jan-2000 00:00:00', config('app.timezone')));

$upgradedConfiguration = app(UpgradeSavedConfiguration::class)->upgrade($this->getConfiguration(), $this->removedConfigurationKeys, $this->newConfiguration);

Expand All @@ -52,7 +52,7 @@ function it_upgrades_saved_configuration()
# ------------------------------------------------------------------------------
# 17-Jul-2016 8:51 pm (auto-generated by Lambo):
# 1-Jan-2000 12:00 am (auto-generated by Lambo):
# ------------------------------------------------------------------------------
# Lambo has commented out the following configuration items as they
# are no-longer used. You may safely remove them:
Expand Down

0 comments on commit 347ac20

Please sign in to comment.