activity_controller_spec.rb 469 B

123456789101112131415161718192021
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. RSpec.describe Api::V1::Instances::ActivityController, type: :controller do
  4. describe 'GET #show' do
  5. it 'returns 200' do
  6. get :show
  7. expect(response).to have_http_status(200)
  8. end
  9. context '!Setting.activity_api_enabled' do
  10. it 'returns 404' do
  11. Setting.activity_api_enabled = false
  12. get :show
  13. expect(response).to have_http_status(404)
  14. end
  15. end
  16. end
  17. end