FIX: hitting '/t/:id/posts.json' should return the first page of posts

This commit is contained in:
Régis Hanol
2016-04-05 19:12:14 +02:00
parent a1add415e5
commit d402a45781
3 changed files with 12 additions and 2 deletions

View File

@ -813,6 +813,16 @@ describe TopicsController do
end
end
describe '#posts' do
let(:topic) { Fabricate(:post).topic }
it 'returns first posts of the topic' do
get :posts, topic_id: topic.id, format: :json
expect(response).to be_success
expect(response.content_type).to eq('application/json')
end
end
describe '#feed' do
let(:topic) { Fabricate(:post).topic }