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:
Alexander
2013-02-21 10:20:00 -08:00
parent e363950bf5
commit 8855a0bfbe
12 changed files with 125 additions and 1 deletions

View File

@ -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)