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.

22 lines
478 B

7 years ago
7 years ago
7 years ago
7 years ago
  1. require 'rails_helper'
  2. RSpec.describe TagsController, type: :controller do
  3. render_views
  4. describe 'GET #show' do
  5. before do
  6. Fabricate(:tag, name: 'test')
  7. end
  8. it 'returns http success' do
  9. get :show, params: { id: 'test' }
  10. expect(response).to have_http_status(:success)
  11. end
  12. it 'returns http missing for non-existent tag' do
  13. get :show, params: { id: 'none' }
  14. expect(response).to have_http_status(:missing)
  15. end
  16. end
  17. end