aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--app/config/security.yml2
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig4
-rw-r--r--tests/Wallabag/CoreBundle/Controller/RssControllerTest.php25
3 files changed, 28 insertions, 3 deletions
diff --git a/app/config/security.yml b/app/config/security.yml
index e14a0bd1..796dc361 100644
--- a/app/config/security.yml
+++ b/app/config/security.yml
@@ -60,7 +60,7 @@ security:
60 - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY } 60 - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
61 - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY } 61 - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
62 - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY } 62 - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
63 - { path: /(unread|starred|archive).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } 63 - { path: /(unread|starred|archive|all).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
64 - { path: /tags/(.*).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } 64 - { path: /tags/(.*).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
65 - { path: ^/share, roles: IS_AUTHENTICATED_ANONYMOUSLY } 65 - { path: ^/share, roles: IS_AUTHENTICATED_ANONYMOUSLY }
66 - { path: ^/settings, roles: ROLE_SUPER_ADMIN } 66 - { path: ^/settings, roles: ROLE_SUPER_ADMIN }
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig
index d70aa5dc..25d09ec3 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig
@@ -11,7 +11,7 @@
11 <link rel="next" href="{{ url }}?page={{ entries.nextPage }}"/> 11 <link rel="next" href="{{ url }}?page={{ entries.nextPage }}"/>
12 {% endif -%} 12 {% endif -%}
13 <link rel="last" href="{{ url }}?page={{ entries.nbPages }}"/> 13 <link rel="last" href="{{ url }}?page={{ entries.nbPages }}"/>
14 <pubDate>{{ "now"|date('D, d M Y H:i:s') }}</pubDate> 14 <pubDate>{{ "now"|date(constant('DATE_RSS')) }}</pubDate>
15 <generator>wallabag</generator> 15 <generator>wallabag</generator>
16 <description>wallabag {{ type }} elements</description> 16 <description>wallabag {{ type }} elements</description>
17 17
@@ -22,7 +22,7 @@
22 <source url="{{ url('view', { 'id': entry.id }) }}">wallabag</source> 22 <source url="{{ url('view', { 'id': entry.id }) }}">wallabag</source>
23 <link>{{ entry.url }}</link> 23 <link>{{ entry.url }}</link>
24 <guid>{{ entry.url }}</guid> 24 <guid>{{ entry.url }}</guid>
25 <pubDate>{{ entry.createdAt|date('D, d M Y H:i:s') }}</pubDate> 25 <pubDate>{{ entry.createdAt|date(constant('DATE_RSS')) }}</pubDate>
26 <description> 26 <description>
27 <![CDATA[{%- if entry.readingTime > 0 -%}{{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': entry.readingTime}) }}{%- else -%}{{ 'entry.list.reading_time_less_one_minute'|trans|raw }}{%- endif %}{{ entry.content|raw -}}]]> 27 <![CDATA[{%- if entry.readingTime > 0 -%}{{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': entry.readingTime}) }}{%- else -%}{{ 'entry.list.reading_time_less_one_minute'|trans|raw }}{%- endif %}{{ entry.content|raw -}}]]>
28 </description> 28 </description>
diff --git a/tests/Wallabag/CoreBundle/Controller/RssControllerTest.php b/tests/Wallabag/CoreBundle/Controller/RssControllerTest.php
index c6ca4937..2af6e14f 100644
--- a/tests/Wallabag/CoreBundle/Controller/RssControllerTest.php
+++ b/tests/Wallabag/CoreBundle/Controller/RssControllerTest.php
@@ -61,6 +61,9 @@ class RssControllerTest extends WallabagCoreTestCase
61 [ 61 [
62 '/wallace/YZIOAUZIAO/archives.xml', 62 '/wallace/YZIOAUZIAO/archives.xml',
63 ], 63 ],
64 [
65 '/wallace/YZIOAUZIAO/all.xml',
66 ],
64 ]; 67 ];
65 } 68 }
66 69
@@ -141,6 +144,28 @@ class RssControllerTest extends WallabagCoreTestCase
141 $this->validateDom($client->getResponse()->getContent(), 'archive', 'archive'); 144 $this->validateDom($client->getResponse()->getContent(), 'archive', 'archive');
142 } 145 }
143 146
147 public function testAll()
148 {
149 $client = $this->getClient();
150 $em = $client->getContainer()->get('doctrine.orm.entity_manager');
151 $user = $em
152 ->getRepository('WallabagUserBundle:User')
153 ->findOneByUsername('admin');
154
155 $config = $user->getConfig();
156 $config->setRssToken('SUPERTOKEN');
157 $config->setRssLimit(null);
158 $em->persist($config);
159 $em->flush();
160
161 $client = $this->getClient();
162 $client->request('GET', '/admin/SUPERTOKEN/all.xml');
163
164 $this->assertSame(200, $client->getResponse()->getStatusCode());
165
166 $this->validateDom($client->getResponse()->getContent(), 'all', 'all');
167 }
168
144 public function testPagination() 169 public function testPagination()
145 { 170 {
146 $client = $this->getClient(); 171 $client = $this->getClient();