gitlab-org--gitlab-foss/spec/controllers/dashboard/projects_controller_spec.rb
Alejandro Rodríguez 585fcfb9e7 Fix undefined variable error on json project views
This mistake seems to have always been there, but it only resulted in
errors on the `/explore*.json` since they were the one that _actually_
relied on the local variables.
2019-03-18 21:27:28 -03:00

31 lines
582 B
Ruby

require 'spec_helper'
describe Dashboard::ProjectsController do
it_behaves_like 'authenticates sessionless user', :index, :atom
context 'json requests' do
render_views
let(:user) { create(:user) }
before do
sign_in(user)
end
describe 'GET /projects.json' do
before do
get :index, format: :json
end
it { is_expected.to respond_with(:success) }
end
describe 'GET /starred.json' do
before do
get :starred, format: :json
end
it { is_expected.to respond_with(:success) }
end
end
end