summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/github_import/label_formatter_spec.rb
blob: e94440a7fb05b2251accb3823f79a5ef5b0b4071 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require 'spec_helper'

describe Gitlab::GithubImport::LabelFormatter, lib: true do

  describe '#attributes' do
    it 'returns formatted attributes' do
      project = create(:project)
      raw = double(name: 'improvements', color: 'e6e6e6')

      formatter = described_class.new(project, raw)

      expect(formatter.attributes).to eq({
        project: project,
        title: 'improvements',
        color: '#e6e6e6'
      })
    end
  end
end