From 7875c0638805bc0c61c206f49342a5878aeaf514 Mon Sep 17 00:00:00 2001 From: Emelia Smith Date: Sun, 9 Jun 2024 18:03:36 +0200 Subject: [PATCH] Add test case for App token when the instance does not allow public preview of its timelines --- spec/requests/api/v1/timelines/public_spec.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/spec/requests/api/v1/timelines/public_spec.rb b/spec/requests/api/v1/timelines/public_spec.rb index 364e48d3d2..6f6dec8bf8 100644 --- a/spec/requests/api/v1/timelines/public_spec.rb +++ b/spec/requests/api/v1/timelines/public_spec.rb @@ -105,6 +105,18 @@ describe 'Public' do it_behaves_like 'a successful request to the public timeline' end + context 'with an authenticated application' do + let(:client_app) { Fabricate(:application) } + let(:token) { Fabricate(:accessible_access_token, application: client_app, scopes: scopes) } + + # it_behaves_like 'a successful request to the public timeline' + it 'returns http unprocessable entity' do + subject + + expect(response).to have_http_status(422) + end + end + context 'with an unauthenticated user' do let(:headers) { {} }