]> cat aescling's git repositories - mastodon.git/commitdiff
Test case for new api endpoint
authorEugen Rochko <eugen@zeonfederated.com>
Thu, 15 Sep 2016 22:27:09 +0000 (00:27 +0200)
committerEugen Rochko <eugen@zeonfederated.com>
Thu, 15 Sep 2016 22:27:09 +0000 (00:27 +0200)
spec/controllers/api/statuses_controller_spec.rb

index 64e201f3cc75117941027ac5efcb5b7ec72a2cbb..d02cc9b2906857cbd256b6893f9bb33a8b558c9f 100644 (file)
@@ -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