Skip to content

Commit

Permalink
Update the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed May 19, 2022
1 parent dab533f commit a80593e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/Feature/Services/RssFeedServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function test_markdown_blog_posts_are_added_to_rss_feed_through_autodisco

config(['hyde.site_url' => 'https://example.com']);

file_put_contents(Hyde::path('rss-test.jpg'), 'statData'); // 8 bytes to test stat gets file length
file_put_contents(Hyde::path('_media/rss-test.jpg'), 'statData'); // 8 bytes to test stat gets file length

$service = new RssFeedService();
$service->generate();
Expand All @@ -114,12 +114,12 @@ public function test_markdown_blog_posts_are_added_to_rss_feed_through_autodisco
$this->assertEquals('test', $item->category);

$this->assertObjectHasAttribute('enclosure', $item);
$this->assertEquals('https://example.com/rss-test.jpg', $item->enclosure->attributes()->url);
$this->assertEquals('https://example.com/media/rss-test.jpg', $item->enclosure->attributes()->url);
$this->assertEquals('image/jpeg', $item->enclosure->attributes()->type);
$this->assertEquals('8', $item->enclosure->attributes()->length);

unlink(Hyde::path('_posts/rss.md'));
unlink(Hyde::path('rss-test.jpg'));
unlink(Hyde::path('_media/rss-test.jpg'));
}

// Test getXML method returns XML string
Expand Down

0 comments on commit a80593e

Please sign in to comment.