summaryrefslogtreecommitdiff
path: root/spec/helpers/projects/cluster_agents_helper_spec.rb
blob: 2935a74586b32f9003347e099390d62888a6f8e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Projects::ClusterAgentsHelper do
  describe '#js_cluster_agent_details_data' do
    let_it_be(:project) { create(:project) }

    let(:agent_name) { 'agent-name' }

    subject { helper.js_cluster_agent_details_data(agent_name, project) }

    it 'returns name' do
      expect(subject[:agent_name]).to eq(agent_name)
    end

    it 'returns project path' do
      expect(subject[:project_path]).to eq(project.full_path)
    end
  end
end