|
|
|
@ -2,15 +2,13 @@
|
|
|
|
|
|
|
|
|
|
require 'rails_helper'
|
|
|
|
|
|
|
|
|
|
RSpec.describe Api::V1::Trends::TagsController do
|
|
|
|
|
render_views
|
|
|
|
|
|
|
|
|
|
describe 'GET #index' do
|
|
|
|
|
RSpec.describe 'API V1 Trends Tags' do
|
|
|
|
|
describe 'GET /api/v1/trends/tags' do
|
|
|
|
|
context 'when trends are disabled' do
|
|
|
|
|
before { Setting.trends = false }
|
|
|
|
|
|
|
|
|
|
it 'returns http success' do
|
|
|
|
|
get :index
|
|
|
|
|
get '/api/v1/trends/tags'
|
|
|
|
|
|
|
|
|
|
expect(response).to have_http_status(200)
|
|
|
|
|
expect(response.headers).to_not include('Link')
|
|
|
|
@ -23,7 +21,7 @@ RSpec.describe Api::V1::Trends::TagsController do
|
|
|
|
|
it 'returns http success' do
|
|
|
|
|
prepare_trends
|
|
|
|
|
stub_const('Api::V1::Trends::TagsController::DEFAULT_TAGS_LIMIT', 2)
|
|
|
|
|
get :index
|
|
|
|
|
get '/api/v1/trends/tags'
|
|
|
|
|
|
|
|
|
|
expect(response).to have_http_status(200)
|
|
|
|
|
expect(response.headers).to include('Link')
|