Welcome to mirror list, hosted at ThFree Co, Russian Federation.

project_spec.rb « models « benchmarks « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0c6b533ac2b93c32a73ca3a4b7abf75d33b25e49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require 'spec_helper'

describe Project, benchmark: true do
  describe '.find_with_namespace' do
    let(:group)   { create(:group, name: 'sisinmaru') }
    let(:project) { create(:project, name: 'maru', namespace: group) }

    describe 'using a capitalized namespace' do
      benchmark_subject { described_class.find_with_namespace('sisinmaru/MARU') }

      it { is_expected.to iterate_per_second(600) }
    end

    describe 'using a lowercased namespace' do
      benchmark_subject { described_class.find_with_namespace('sisinmaru/maru') }

      it { is_expected.to iterate_per_second(600) }
    end
  end
end