debian-mirror-gitlab/spec/features/dashboard/root_explore_spec.rb

34 lines
728 B
Ruby
Raw Normal View History

2019-02-13 22:33:31 +05:30
# frozen_string_literal: true
require 'spec_helper'
describe 'Root explore' do
set(:public_project) { create(:project, :public) }
set(:archived_project) { create(:project, :archived) }
set(:internal_project) { create(:project, :internal) }
set(:private_project) { create(:project, :private) }
before do
allow(Gitlab).to receive(:com?).and_return(true)
end
context 'when logged in' do
set(:user) { create(:user) }
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