From 4f25e3d042fa92ba39cd3994c1de72193b2b9eb0 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 16 Sep 2016 00:27:09 +0200 Subject: [PATCH] Test case for new api endpoint --- spec/controllers/api/statuses_controller_spec.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/spec/controllers/api/statuses_controller_spec.rb b/spec/controllers/api/statuses_controller_spec.rb index 64e201f3cc7..d02cc9b2906 100644 --- a/spec/controllers/api/statuses_controller_spec.rb +++ b/spec/controllers/api/statuses_controller_spec.rb @@ -20,6 +20,19 @@ RSpec.describe Api::StatusesController, type: :controller do end end + describe 'GET #context' do + let(:status) { Fabricate(:status, account: user.account) } + + before do + Fabricate(:status, account: user.account, thread: status) + end + + it 'returns http success' do + get :context, params: { id: status.id } + expect(response).to have_http_status(:success) + end + end + describe 'GET #home' do it 'returns http success' do get :home