summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2025-09-02 21:55:03 +0300
committerAndrew Dolgov <fox@fakecake.org>2025-09-02 22:22:24 +0300
commit36644365c8622a249118ea72b50f0e468ea1e394 (patch)
tree7df9dc57518c568670b1c4a4faf53510d11c3616 /tests
parentbe3ee920b145ecad8fb468c00c25e53ced68da5c (diff)
use built-in feed for integration test
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/ApiTest.php6
-rw-r--r--tests/integration/feed.xml14
2 files changed, 19 insertions, 1 deletions
diff --git a/tests/integration/ApiTest.php b/tests/integration/ApiTest.php
index d7b605b6e..5cf364217 100644
--- a/tests/integration/ApiTest.php
+++ b/tests/integration/ApiTest.php
@@ -4,10 +4,12 @@ use PHPUnit\Framework\TestCase;
/** @group integration */
final class ApiTest extends TestCase {
private string $api_url = "";
+ private string $app_url = "";
private string $sid = "";
function __construct() {
$this->api_url = getenv('API_URL');
+ $this->app_url = getenv('APP_URL');
parent::__construct();
}
@@ -73,9 +75,11 @@ final class ApiTest extends TestCase {
}
public function test_subscribeToFeed() : void {
- $resp = $this->api(["op" => "subscribeToFeed", "feed_url" => "https://gitlab.tt-rss.org/tt-rss/tt-rss.atom"]);
+ $resp = $this->api(["op" => "subscribeToFeed", "feed_url" => $this->app_url . "/feed.xml"]);
$this->common_assertions($resp);
+ print_r($resp);
+
$this->assertArrayHasKey("feed_id", $resp['content']['status']);
}
diff --git a/tests/integration/feed.xml b/tests/integration/feed.xml
new file mode 100644
index 000000000..a705b0f79
--- /dev/null
+++ b/tests/integration/feed.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom" xml:base="https://mfw.fakecake.org/testfeeds/" >
+ <title type="text">Atom:base testfeed</title>
+ <id>tag:fakecake.org,2021:minerva-feed</id>
+ <updated>2021-05-21T14:17:43+04:00</updated>
+ <entry>
+ <title>x-21may2020</title>
+ <link rel="alternate" type="text/html" href="clouds.png" />
+ <id>tag:fakecake.org,2021:minerva-2021-05-20</id>
+ <updated>2021-05-21T07:54:43+04:00</updated>
+ <published>2021-05-21T07:54:43+04:00</published>
+ <content type="html">...</content>
+ </entry>
+</feed>