2018-12-06 08:41:20 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-16 14:09:01 -04:00
|
|
|
RSpec.describe 'Root explore' do
|
2020-02-26 13:09:24 -05:00
|
|
|
let_it_be(:public_project) { create(:project, :public) }
|
|
|
|
let_it_be(:archived_project) { create(:project, :archived) }
|
|
|
|
let_it_be(:internal_project) { create(:project, :internal) }
|
|
|
|
let_it_be(:private_project) { create(:project, :private) }
|
2018-12-06 08:41:20 -05:00
|
|
|
|
|
|
|
before do
|
|
|
|
allow(Gitlab).to receive(:com?).and_return(true)
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'when logged in' do
|
2020-02-26 13:09:24 -05:00
|
|
|
let_it_be(:user) { create(:user) }
|
2018-12-06 08:41:20 -05:00
|
|
|
|
|
|
|
before do
|
|
|
|
sign_in(user)
|
|
|
|
visit explore_projects_path
|
|
|
|
end
|
|
|
|
|
|
|
|
include_examples 'shows public and internal projects'
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'when not logged in' do
|
|
|
|
before do
|
|
|
|
visit explore_projects_path
|
|
|
|
end
|
|
|
|
|
|
|
|
include_examples 'shows public projects'
|
|
|
|
end
|
|
|
|
end
|