You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
610 B

  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. RSpec.describe Admin::TagsController, type: :controller do
  4. render_views
  5. before do
  6. sign_in Fabricate(:user, admin: true)
  7. end
  8. describe 'GET #index' do
  9. let!(:tag) { Fabricate(:tag) }
  10. before do
  11. get :index
  12. end
  13. it 'returns status 200' do
  14. expect(response).to have_http_status(200)
  15. end
  16. end
  17. describe 'GET #show' do
  18. let!(:tag) { Fabricate(:tag) }
  19. before do
  20. get :show, params: { id: tag.id }
  21. end
  22. it 'returns status 200' do
  23. expect(response).to have_http_status(200)
  24. end
  25. end
  26. end