2018-12-17 11:32:24 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'rails_helper'
|
|
|
|
|
2023-05-04 05:49:53 +02:00
|
|
|
RSpec.describe Api::V1::Instances::ActivityController do
|
2018-12-17 11:32:24 +01:00
|
|
|
describe 'GET #show' do
|
|
|
|
it 'returns 200' do
|
|
|
|
get :show
|
|
|
|
expect(response).to have_http_status(200)
|
|
|
|
end
|
|
|
|
|
2023-05-04 05:49:08 +02:00
|
|
|
context 'with !Setting.activity_api_enabled' do
|
2018-12-17 11:32:24 +01:00
|
|
|
it 'returns 404' do
|
|
|
|
Setting.activity_api_enabled = false
|
|
|
|
|
|
|
|
get :show
|
|
|
|
expect(response).to have_http_status(404)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|