2020-01-01 13:55:28 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-07-28 23:09:34 +05:30
|
|
|
RSpec.describe Gitlab::LegacyGithubImport::IssuableFormatter do
|
2017-08-17 22:00:37 +05:30
|
|
|
let(:raw_data) do
|
|
|
|
double(number: 42)
|
|
|
|
end
|
2020-10-24 23:57:45 +05:30
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
let(:project) { double(import_type: 'github') }
|
|
|
|
let(:issuable_formatter) { described_class.new(project, raw_data) }
|
|
|
|
|
|
|
|
describe '#project_association' do
|
|
|
|
it { expect { issuable_formatter.project_association }.to raise_error(NotImplementedError) }
|
|
|
|
end
|
|
|
|
|
|
|
|
describe '#number' do
|
|
|
|
it { expect(issuable_formatter.number).to eq(42) }
|
|
|
|
end
|
|
|
|
|
|
|
|
describe '#find_condition' do
|
|
|
|
it { expect(issuable_formatter.find_condition).to eq({ iid: 42 }) }
|
|
|
|
end
|
|
|
|
end
|