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

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

describe EnvironmentsHelper do
  include ApplicationHelper

  describe 'operations_metrics_path' do
    let(:project) { create(:project) }

    it 'returns empty metrics path when environment is nil' do
      expect(helper.operations_metrics_path(project, nil)).to eq(empty_project_environments_path(project))
    end

    it 'returns environment metrics path when environment is passed' do
      environment = create(:environment, project: project)

      expect(helper.operations_metrics_path(project, environment)).to eq(environment_metrics_path(environment))
    end
  end
end