mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 10:41:25 +08:00
RSS of a topic via new route
Adds TopicView#recent_posts; Post#by_newest, #with_user, #author_readable; User#readable_name Autodiscovery tag in topic show HTML.
This commit is contained in:
@ -299,6 +299,16 @@ describe TopicsController do
|
||||
|
||||
end
|
||||
|
||||
describe '#feed' do
|
||||
let(:topic) { Fabricate(:post).topic }
|
||||
|
||||
it 'renders rss of the topic' do
|
||||
get :feed, topic_id: topic.id, slug: 'foo', format: :rss
|
||||
response.should be_success
|
||||
response.content_type.should == 'application/rss+xml'
|
||||
end
|
||||
end
|
||||
|
||||
describe 'update' do
|
||||
it "won't allow us to update a topic when we're not logged in" do
|
||||
lambda { xhr :put, :update, topic_id: 1, slug: 'xyz' }.should raise_error(Discourse::NotLoggedIn)
|
||||
|
Reference in New Issue
Block a user