Skip to content

Commit

Permalink
Merge pull request #737 from ConvertKit/broadcasts-importer-meta-desc…
Browse files Browse the repository at this point in the history
…ription

Broadcasts Importer: Test Meta Description stored in Post Excerpt
  • Loading branch information
n7studios authored Nov 5, 2024
2 parents 16181fb + 02409ff commit a560515
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .env.dist.testing
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ CONVERTKIT_API_BROADCAST_ID=3175837
CONVERTKIT_API_BROADCAST_FIRST_URL="https://cheerful-architect-3237.kit.com/posts/html-template-test"
CONVERTKIT_API_BROADCAST_FIRST_TITLE="HTML Template Test"
CONVERTKIT_API_BROADCAST_FIRST_DATE="2023-08-02T16:34:51.000Z"
CONVERTKIT_API_BROADCAST_SECOND_URL="https://cheerful-architect-3237.kit.com/posts/paid-subscriber-broadcast"
CONVERTKIT_API_BROADCAST_FIRST_DESCRIPTION="This is a sample meta description."
CONVERTKIT_API_BROADCAST_SECOND_URL="https://cheerful-architect-3237.ck.page/posts/paid-subscriber-broadcast"
CONVERTKIT_API_BROADCAST_SECOND_TITLE="Paid Subscriber Broadcast"
CONVERTKIT_API_BROADCAST_THIRD_URL="https://cheerful-architect-3237.kit.com/posts/test-subject"
CONVERTKIT_API_BROADCAST_THIRD_TITLE="Test Subject"
Expand Down
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ CONVERTKIT_API_BROADCAST_ID=3175837
CONVERTKIT_API_BROADCAST_FIRST_URL="https://cheerful-architect-3237.kit.com/posts/html-template-test"
CONVERTKIT_API_BROADCAST_FIRST_TITLE="HTML Template Test"
CONVERTKIT_API_BROADCAST_FIRST_DATE="2023-08-02T16:34:51.000Z"
CONVERTKIT_API_BROADCAST_SECOND_URL="https://cheerful-architect-3237.kit.com/posts/paid-subscriber-broadcast"
CONVERTKIT_API_BROADCAST_FIRST_DESCRIPTION="This is a sample meta description."
CONVERTKIT_API_BROADCAST_SECOND_URL="https://cheerful-architect-3237.ck.page/posts/paid-subscriber-broadcast"
CONVERTKIT_API_BROADCAST_SECOND_TITLE="Paid Subscriber Broadcast"
CONVERTKIT_API_BROADCAST_THIRD_URL="https://cheerful-architect-3237.kit.com/posts/test-subject"
CONVERTKIT_API_BROADCAST_THIRD_TITLE="Test Subject"
Expand Down
3 changes: 3 additions & 0 deletions tests/wpunit/BroadcastsImportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,9 @@ private function assertImportValid($post)
// Confirm published date matches the Broadcast.
$date = date('Y-m-d', strtotime($_ENV['CONVERTKIT_API_BROADCAST_FIRST_DATE'])) . ' ' . date('H:i:s', strtotime($_ENV['CONVERTKIT_API_BROADCAST_FIRST_DATE']));
$this->assertEquals($date, $post->post_date_gmt);

// Confirm SEO description is stored as the Post's excerpt.
$this->assertEquals($_ENV['CONVERTKIT_API_BROADCAST_FIRST_DESCRIPTION'], $post->post_excerpt);
}

/**
Expand Down

0 comments on commit a560515

Please sign in to comment.