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

branch_entity_spec.rb « serializers « jira_connect « atlassian « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 86e48a4a0fd2583ef3be4e1beed2194ea43c032f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Atlassian::JiraConnect::Serializers::BranchEntity, feature_category: :integrations do
  let(:project) { create(:project, :repository) }
  let(:branch) { project.repository.find_branch('improve/awesome') }

  subject { described_class.represent(branch, project: project).as_json }

  it 'sets the hash of the branch name as the id' do
    expect(subject[:id]).to eq('bbfba9b197ace5da93d03382a7ce50081ae89d99faac1f2326566941288871ce')
  end
end