fix: double rendor error on message create api for suspended accounts (#7917)
This commit is contained in:
@@ -67,6 +67,18 @@ RSpec.describe 'API Base', type: :request do
|
||||
|
||||
expect(response).to have_http_status(:unauthorized)
|
||||
end
|
||||
|
||||
# this exception occured in a client instance (DoubleRender error)
|
||||
it 'will not throw exception if user does not have access to suspended account' do
|
||||
user_with_out_access = create(:user)
|
||||
account.update!(status: :suspended)
|
||||
|
||||
post "/api/v1/accounts/#{account.id}/canned_responses",
|
||||
headers: { api_access_token: user_with_out_access.access_token.token },
|
||||
as: :json
|
||||
|
||||
expect(response).to have_http_status(:unauthorized)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user