gitlab-org--gitlab-foss/spec/features/admin/dashboard_spec.rb
Andreas Brandl 988dc80585
Further remove code branches by database type
We dropped MySQL support and a lot of mysql specific code has been
removed in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/29608.

This comes in from the other direction and removes any `if postgresql?`
branches.
2019-07-29 12:47:06 +02:00

28 lines
722 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
describe 'admin visits dashboard' do
include ProjectForksHelper
before do
sign_in(create(:admin))
end
context 'counting forks' do
it 'correctly counts 2 forks of a project' do
project = create(:project)
project_fork = fork_project(project)
fork_project(project_fork)
# Make sure the fork_networks & fork_networks reltuples have been updated
# to get a correct count on postgresql
ActiveRecord::Base.connection.execute('ANALYZE fork_networks')
ActiveRecord::Base.connection.execute('ANALYZE fork_network_members')
visit admin_root_path
expect(page).to have_content('Forks 2')
end
end
end